From 657d75ff683ef35003bedd64a0fa420e7d294f85 Mon Sep 17 00:00:00 2001 From: jiaosong <jiaosong6760@dingtalk.com> Date: 星期四, 07 十二月 2023 16:18:16 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- server/dmvisit_service/src/main/java/com/doumee/core/utils/Constants.java | 373 ++++++++++------------------------------------------ 1 files changed, 74 insertions(+), 299 deletions(-) diff --git a/server/dmvisit_service/src/main/java/com/doumee/core/utils/Constants.java b/server/dmvisit_service/src/main/java/com/doumee/core/utils/Constants.java index 6ad128e..1fce4da 100644 --- a/server/dmvisit_service/src/main/java/com/doumee/core/utils/Constants.java +++ b/server/dmvisit_service/src/main/java/com/doumee/core/utils/Constants.java @@ -1,12 +1,12 @@ package com.doumee.core.utils; -import org.apache.commons.collections4.CollectionUtils; + +import org.apache.commons.lang3.StringUtils; import java.math.BigDecimal; import java.net.URLDecoder; -import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; +import java.text.SimpleDateFormat; +import java.util.Date; public class Constants { @@ -22,6 +22,55 @@ public static final String HK_PUSH_URL = "HK_PUSH_URL"; public static final String HK_ROOTORG_CODE ="HK_ROOTORG_CODE" ; + //琚嫓璁夸汉淇℃伅鏍¢獙鏂瑰紡锛�0鎵嬫満鍙峰崟鐙牎楠� 1鎵嬫満鍙峰拰濮撳悕缁勫悎鏍¢獙锛� + public static final String BEVISITED_USER_VALID = "BEVISITED_USER_VALID"; + public static final String SELECT_DOORS_VISIT_REQUIRED = "SELECT_DOORS_VISIT_REQUIRED"; + public static final String SELECT_DOORS_LW_REQUIRED = "SELECT_DOORS_LW_REQUIRED"; + public static final String PROBLEM_LW_REQUIRED = "PROBLEM_LW_REQUIRED"; + public static final String PROBLEM_VISIT_REQUIRED = "PROBLEM_VISIT_REQUIRED"; + public static final String MDJ_LW_REQUIRED = "MDJ_LW_REQUIRED"; + public static final String MDJ_VISIT_REQUIRED = "MDJ_VISIT_REQUIRED"; + public static final String EDS_PWD ="!@#$%^&QWERTY" ; + + + public static Date getBirthdyByCardNo(String idCard){ + if(idCard ==null || idCard.length()<14){ + return null; + } + Date birthday = null; // 瑙f瀽涓烘棩鏈熷璞� + String birthdayString = idCard.substring(6, 14); // 鎴彇韬唤璇佸彿鐨勫墠鍏綅鏁板瓧浣滀负鍑虹敓鏃ユ湡 + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd"); + try { + birthday = dateFormat.parse(birthdayString); + } catch (Exception e) { + throw new RuntimeException(e); + } + return birthday; +} + public static String getTuominStr(String s){ + if(StringUtils.isEmpty(s)){ + return ""; + } + int l = s.length(); + if(l <= 2){ + return s.substring(0,1)+"****"; + } + if(l <= 5){ + return s.substring(0,2)+"***"; + } + if(l <= 10){ + return s.substring(0,3)+"***"+s.substring(l-3,l); + } + if(l <= 11){ + return s.substring(0,3)+"****"+s.substring(l-4,l); + } + if(l <= 15){ + return s.substring(0,3)+"****"+s.substring(l-4,l); + } + return s.substring(0,5)+"*******"+s.substring(l-6,l); +} + + /** * mq tag */ @@ -33,6 +82,11 @@ String activity_looknum = "looknum"; String activity_signup = "signup"; } + public interface DeviceRoleType{ + int lw = 0;//鍔冲姟璁垮 + int fk = 1;//鏅�氳瀹� + int nb = 2;//鍐呴儴璁垮 + } public interface DOOR_ROLE_TYPE{ int lw = 0; int fk = 1; @@ -41,9 +95,6 @@ public static final String SUCCESS_STR = "SUCCESS" ; //寮�闂ㄦ椂闂存湁鏁堟湡锛堝垎閽燂級 - public static final String QR_OPENBOOK_VALIDTIME="QR_OPENBOOK_VALIDTIME"; - public static final String QR_OPENROOM_VALIDTIME="QR_OPENROOM_VALIDTIME"; - public static final String ADVANCE_IN="ADVANCE_IN"; public static final String ACCESS_ID="ACCESS_ID"; public static final String BUCKETNAME = "BUCKETNAME"; public static final String OSS = "OSS"; @@ -53,49 +104,21 @@ public static final String ENDPOINT = "ENDPOINT"; public static final String RESOURCE_PATH = "RESOURCE_PATH"; //鍙戦�佷細璁紑濮� 瀹氭椂鎻愬墠澶氬皯鍒嗛挓鍙戦�� - public static final String NOTICE_TIME = "NOTICE_TIME"; - - public static final String INITIAL_PASSWORD = "INITIAL_PASSWORD"; - public static final String ACCESS_TOKEN = "ACCESS_TOKEN"; - - public static final String INITIAL_ROLE = "INITIAL_ROLE"; - - public static final String PLAT_ADDR="PLAT_ADDR"; - public static final String ADDR_PHONE="ADDR_PHONE"; - public static final String ADDR_NAME="ADDR_NAME"; - public static final String ADDR_INFO="ADDR_INFO"; public static final String SYSTEM ="SYSTEM"; - public static final String DEFAULT_PASSWORD = "DEFAULT_PASSWORD" ; - public static final String CREATION_ROLE = "CREATION_ROLE"; - public static final String ORG_ROLE = "ORG_ROLE"; - - public static final String USER_AGREEMENT = "USER_AGREEMENT"; - - public static final String ABOUT_USER = "ABOUT_USER"; - - public static final String RECHARGE_MONEY = "RECHARGE_MONEY"; - - public static final String PLATFORM_ADDRESS = "PLATFORM_ADDRESS"; - - public static final String PROJECT_HEAD_IMG = "PROJECT_HEAD_IMG"; public static final String COFFEE_BEAN_TASK ="COFFEE_BEAN_TASK"; - public static final String SIGN_BOARD="SIGN_BOARD";//姣忔棩绛惧埌 - public static final String SHARE_INFO="SHARE_INFO";//鍒嗕韩璧勮 - public static final String SHARE_INVITE_BILL="SHARE_INVITE_BILL";//鍒嗕韩閭�璇锋捣鎶� - public static final String INVITE_USER_LOGIN="INVITE_USER_LOGIN";///閭�璇锋柊鐢ㄦ埛娉ㄥ唽 - public static final String POST_COMMENTS="POST_COMMENTS";//鍙戝竷璇勮 - public static final String COFFEE_MAP_CONSUME="COFFEE_MAP_CONSUME";//鍜栧暋鍦板浘娑堣垂 - // 鏈嶅姟椤圭洰 - public static final String PROJECTS = "PROJECTS"; - //鐢ㄦ埛澶村儚 - public static final String SYSUSER = "SYSUSER"; - public static final String ROOT_PATH="ROOT_PATH";//鏈湴鏂囦欢涓婁紶鍦板潃閰嶇疆 - public static final String FILE_DIR="FILE_DIR";//鏈湴鏂囦欢璁块棶鍦板潃閰嶇疆 + + + public static final String WX_PLATFORM = "WX_PLATFORM"; + public static final String WX_PLATFORM_ACCESS_TOKEN = "WX_PLATFORM_ACCESS_TOKEN"; + public static final String WX_PLATFORM_APPID = "WX_PLATFORM_APPID"; + public static final String WX_PLATFORM_SECRET = "WX_PLATFORM_SECRET"; + + @@ -105,13 +128,7 @@ public static final String ACTIVITY_SIGN_KEY = "actcode_"; public static final String AFTERSALE_KEY = "salecode_"; } - /** - * 浼佷笟鏁版嵁鏉ユ簮 0骞冲彴娉ㄥ唽 1鍚庡彴瀵煎叆 - */ - public interface ORIGIN{ - public static final int platformRegister = 0; - public static final int backstageImport = 1; - } + public static BigDecimal formatBigdecimal(BigDecimal d) { if (d == null) { @@ -171,10 +188,17 @@ int objTypeBook_in = 1;//鍙備細浜哄憳寮�闂� int objTypeBook_out = 2;//璁垮寮�闂� } +public interface memberType{ + int visitor = 0;//鏅�氳瀹� + int lw_visitor = 1;//鍔冲姟璁垮 + int internal = 2;//鍐呴儴浜哄憳 +} public static void main(String[] args) { String t = URLDecoder.decode("https://lsqw.gtja.com/qwcos/v-index.html#/loginforProperty?corpId=ww4b7aefafeb430e4b&corpId=ww4b7aefafeb430e4b&agentId=1000005&agentId=1000005&fromRoute=&userCode=013561&userCode=&userId=zz&userId=&encryptUserCode=&custQwId=wmIUuSDgAAR8MhtVY8w90EyKltvoK5fA&custCode=&openId=op1wZwD1dKuBQywmWWS5957zUOJI&name=%E8%B9%84%E8%B9%84&headUrl=http%3A%2F%2Fwx.qlogo.cn%2Fmmhead%2FQ3auHgzwzM4QlibSOAvYcvRMdsoyF3Ua7duLOYSJfB3dsGsYxIYonBw%2F0&dbHeadUrl=https%3A%2F%2Ftgf.gtja.com%2Ff%2F%2Fqwoms%2F2022512%2Fqwoms_1652332606613_8.jpg"); System.out.println(t); } + + /** * 鐢ㄦ埛绫诲瀷 */ @@ -803,253 +827,4 @@ // 0璁㈠崟閫氱煡 1绯荤粺娑堟伅 2浜掑姩娑堟伅 3浼樻儬鍒告彁閱� 4瀹樻柟瀹㈡湇 5娲诲姩鎺ㄨ崘 6鎴戠殑鍏虫敞 - NOTICE_ORDER(0,"0璁㈠崟閫氱煡","0璁㈠崟閫氱煡"), - NOTICE_SYSTEM(1,"1绯荤粺娑堟伅","1绯荤粺娑堟伅"), - NOTICE_INTERACTION(2,"浜掑姩娑堟伅","浜掑姩娑堟伅"), - NOTICE_MEMBER_COUPON(3,"浼樻儬鍒告彁閱�","浼樻儬鍒告彁閱�"), - NOTICE_ACTIVITY(5,"娲诲姩鎺ㄨ崘","娲诲姩鎺ㄨ崘"), - NOTICE_MEMBER_FOLLOW(6,"鎴戠殑鍏虫敞","鎴戠殑鍏虫敞") - ; - - private Integer key; - - private String type; - - private String content; - - NoticeType(Integer key, String type, String content) { - this.key = key; - this.type = type; - this.content = content; - } - } - - /** - * 绉垎绫诲瀷 - */ - public enum IntegralObjType { - REGISTER(0, "骞冲彴娉ㄥ唽", "骞冲彴娉ㄥ唽",0), - SIGNIN(1, "绛惧埌", "绛惧埌",0), - SHARE(2, "鍒嗕韩閭�璇�", "鍒嗕韩閭�璇�",0), - INVITENEWUSER(3, "閭�璇锋柊鐢ㄦ埛", "閭�璇锋柊鐢ㄦ埛",0), - EXCHANGEGOODS(4, "鍏戞崲鍟嗗搧", "鍏戞崲鍟嗗搧",1), - EXCHANGECOUPON(5, "鍏戞崲浼樻儬鍒�", "鍏戞崲浼樻儬鍒�",1), - SHARE_INFO(6,"鍒嗕韩璧勮","鍒嗕韩璧勮",0), - POST_COMMENTS(7,"鍙戝竷璇勮","鍙戝竷璇勮",0), - COFFEE_MAP_CONSUME(8,"鍜栧暋鍦板浘娑堣垂","鍜栧暋鍦板浘娑堣垂",0), - SHOP_ORDER(9,"浣欓鎶垫墸鍟嗗搧","浣欓鎶垫墸鍟嗗搧",1), - AFTERSALE_BACK(10,"鍞悗閫�娆�","鍞悗閫�娆�",1), - EXCHANGE_CARD(11,"鍗″厖鍊�","鍗″厖鍊�",0), - SYSTEM_RECHARGE(12,"骞冲彴鍏呭��","骞冲彴鍏呭��",0), - SYSTEM_DEDUCT(13,"骞冲彴鎵f","骞冲彴鎵f",0), - SHOP_ORDER_CANCEL(14,"浣欓鎶垫墸鍟嗗搧閫�杩�","浣欓鎶垫墸鍟嗗搧閫�杩�",0) - ; - // 鎴愬憳鍙橀噺 - private String name; - private int key; - private String noteinfo;// 鎻忚堪 - private Integer addTitle; // 0 = 鏂板锛�1 = 涓嶆柊澧� - - // 鏋勯�犳柟娉� - IntegralObjType(int key, String name, String noteinfo ,Integer addTitle) { - this.name = name; - this.key = key; - this.noteinfo = noteinfo; - this.addTitle = addTitle; - } - - // 鏅�氭柟娉� - public static String getName(int index) { - for (IntegralObjType c : IntegralObjType.values()) { - if (c.getKey() == index) { - return c.name; - } - } - return null; - } - - // 鏅�氭柟娉� - public static String getInfo(int index) { - for (IntegralObjType c : IntegralObjType.values()) { - if (c.getKey() == index) { - return c.noteinfo; - } - } - return null; - } - - // get set 鏂规硶 - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getKey() { - return key; - } - - public void setKey(int key) { - this.key = key; - } - - public String getNoteinfo() { - return noteinfo; - } - - - public int getAddTitle() { - return this.addTitle; - } - - public void setAddTitle(Integer addTitle) { - this.addTitle = addTitle; - } - - - } - - - /** - * 鏍囩绫诲瀷 - */ - public enum LabelsType { - GOODSTYPE(0, "鍟嗗搧鍒嗙被", "鍟嗗搧鍒嗙被"), - GOODSBRAND(1, "鍟嗗搧鍝佺墝", "鍟嗗搧鍝佺墝"), - BUSNESSLABEL(2, "鍟嗗鏍囩", "鍟嗗鏍囩"), - EXPRESSDELIVERY(3, "蹇��", "蹇��"), - RETURNOPTIONS(4, "閫�璐ч�夐」", "閫�璐ч�夐」"), - EXCHANGEOPTIONS(5, "鎹㈣揣閫夐」", "鎹㈣揣閫夐」"), - REFUNDOPTIONS(6, "閫�娆鹃�夐」", "閫�娆鹃�夐」"), - CANCELORDEROPTIONS(7, "鍙栨秷璁㈠崟閫夐」", "鍙栨秷璁㈠崟閫夐」"), - COFFERBEANTYPE(8, "鍜栧暋鐧剧鍒嗙被", "鍜栧暋鐧剧鍒嗙被"), - INFOTYPE(9, "鍜ㄨ鍒嗙被", "鍜ㄨ鍒嗙被"), - ACTIVITYMATCHTYPE(10, "娲诲姩璧涗簨鍒嗙被", "娲诲姩璧涗簨鍒嗙被"), - DARENTANDIANTYPE(11, "杈句汉鎺㈠簵鍒嗙被", "杈句汉鎺㈠簵鍒嗙被"), - HOMEZHUANQU(12, "棣栭〉涓撳尯", "棣栭〉涓撳尯"), - - ; - // 鎴愬憳鍙橀噺 - private String name; - private int key; - private String noteinfo;// 鎻忚堪 - - // 鏋勯�犳柟娉� - LabelsType(int key, String name, String noteinfo) { - this.name = name; - this.key = key; - this.noteinfo = noteinfo; - } - - // 鏅�氭柟娉� - public static String getName(int index) { - for (LabelsType c : LabelsType.values()) { - if (c.getKey() == index) { - return c.name; - } - } - return null; - } - - // 鏅�氭柟娉� - public static String getInfo(int index) { - for (LabelsType c : LabelsType.values()) { - if (c.getKey() == index) { - return c.noteinfo; - } - } - return null; - } - - // get set 鏂规硶 - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getKey() { - return key; - } - - public void setKey(int key) { - this.key = key; - } - - public String getNoteinfo() { - return noteinfo; - } - - } - - - /** - * 娲诲姩绫诲瀷 - */ - public enum ActivityType { - - SHOPACTIVITY(0, "鍟嗗娲诲姩", "鍟嗗娲诲姩"), - PLATACTIVITY(1, "骞冲彴娲诲姩", "骞冲彴娲诲姩"), - TANDIAN(2, "鎺㈠簵", "鎺㈠簵"), - CONSULT(3, "璧勮", "璧勮"), - - ; - // 鎴愬憳鍙橀噺 - private String name; - private int key; - private String noteinfo;// 鎻忚堪 - - // 鏋勯�犳柟娉� - ActivityType(int key, String name, String noteinfo) { - this.name = name; - this.key = key; - this.noteinfo = noteinfo; - } - - // 鏅�氭柟娉� - public static String getName(int index) { - for (ActivityType c : ActivityType.values()) { - if (c.getKey() == index) { - return c.name; - } - } - return null; - } - - // 鏅�氭柟娉� - public static String getInfo(int index) { - for (ActivityType c : ActivityType.values()) { - if (c.getKey() == index) { - return c.noteinfo; - } - } - return null; - } - - // get set 鏂规硶 - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getKey() { - return key; - } - - public void setKey(int key) { - this.key = key; - } - - public String getNoteinfo() { - return noteinfo; - } - - } } -- Gitblit v1.9.3