From 2333b0a819ce276cce34a310c54a4f5d260d35da Mon Sep 17 00:00:00 2001
From: wuxw7 <wuxw7@asiainfo.com>
Date: 星期六, 27 十月 2018 12:53:43 +0800
Subject: [PATCH] 加入成员关系功能
---
java110-core/src/main/java/com/java110/core/factory/GenerateCodeFactory.java | 40 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 40 insertions(+), 0 deletions(-)
diff --git a/java110-core/src/main/java/com/java110/core/factory/GenerateCodeFactory.java b/java110-core/src/main/java/com/java110/core/factory/GenerateCodeFactory.java
index 0c4f82e..e74180f 100644
--- a/java110-core/src/main/java/com/java110/core/factory/GenerateCodeFactory.java
+++ b/java110-core/src/main/java/com/java110/core/factory/GenerateCodeFactory.java
@@ -54,6 +54,7 @@
prefixMap.put("storeId","40");
prefixMap.put("storePhotoId","41");
prefixMap.put("storeCerdentialsId","42");
+ prefixMap.put("memberStoreId","43");
prefixMap.put("shopId","50");
prefixMap.put("shopAttrId","51");
prefixMap.put("shopPhotoId","52");
@@ -68,6 +69,8 @@
prefixMap.put("subCommentAttrId","62");
prefixMap.put("commentPhotoId","63");
prefixMap.put("commentScoreId","64");
+ prefixMap.put("communityId","70");
+ prefixMap.put("communityPhotoId","71");
}
private static String PLATFORM_CODE = "0001";
@@ -209,6 +212,14 @@
return getCode(prefixMap.get("storeId"));
}
+ public static String getMemberStoreId() throws GenerateCodeException{
+ if(!MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.KEY_NEED_INVOKE_GENERATE_ID))){
+ return prefixMap.get("memberStoreId") +DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_H)+ nextId("%06d");
+ }
+ //璋冪敤鏈嶅姟
+ return getCode(prefixMap.get("memberStoreId"));
+ }
+
public static String getStorePhotoId() throws GenerateCodeException{
if(!MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.KEY_NEED_INVOKE_GENERATE_ID))){
@@ -231,6 +242,35 @@
return getCode(prefixMap.get("storeCerdentialsId"));
}
+
+ /**
+ * 鑾峰彇灏忓尯ID
+ * @return
+ * @throws GenerateCodeException
+ */
+ public static String getCommunityId() throws GenerateCodeException{
+ if(!MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.KEY_NEED_INVOKE_GENERATE_ID))){
+ return prefixMap.get("communityId") +DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_H)+ nextId("%06d");
+ }
+ //璋冪敤鏈嶅姟
+ return getCode(prefixMap.get("communityId"));
+ }
+
+
+ /**
+ * 鑾峰彇灏忓尯鐓х墖ID
+ * @return
+ * @throws GenerateCodeException
+ */
+ public static String getCommunityPhotoId() throws GenerateCodeException{
+ if(!MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.KEY_NEED_INVOKE_GENERATE_ID))){
+ return prefixMap.get("communityPhotoId") +DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_H)+ nextId("%06d");
+ }
+ //璋冪敤鏈嶅姟
+ return getCode(prefixMap.get("communityPhotoId"));
+ }
+
+
/**
* 鍟嗗搧ID鐢熸垚
* @return
--
Gitblit v1.8.0