| | |
| | | package com.doumee.core.utils; |
| | | |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.fasterxml.jackson.databind.PropertyNamingStrategy; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.net.URLDecoder; |
| | | import java.util.*; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | |
| | |
| | | public static final String HK_APPSECRET ="HK_APPSECRET" ; |
| | | public static final String HK_HTTPS ="HK_HTTPS" ; |
| | | public static final String HK_PUSH_URL = "HK_PUSH_URL"; |
| | | public static final String HK_ROOTORG_CODE ="HK_ROOTORG_CODE" ; |
| | | public static final String HK_ROOTORG_NAME ="HK_ROOTORG_NAME" ; |
| | | |
| | | //被拜访人信息校验方式(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 final String ROOT_PATH = ""; |
| | | public static final String FILE_DIR = ""; |
| | | // 访客来访配置 |
| | | public static final String VISIT_CONFIG = "VISIT_CONFIG"; |
| | | public static final String MEMBER_IMG = "MEMBER_IMG"; |
| | | // 劳务来访配置 |
| | | public static final String LABOR_CONFIG = "LABOR_CONFIG"; |
| | | public static final String VISIT_EVENT_IMG = "VISIT_EVENT_IMG"; |
| | | public static final String CAR_EVENT_IMG = "CAR_EVENT_IMG"; |
| | | public static final String DEVICE_EVENT_IMG = "DEVICE_EVENT_IMG"; |
| | | public static final String FTP ="FTP" ; |
| | | public static final String FTP_HOST ="FTP_HOST" ; |
| | | public static final String FTP_PORT ="FTP_PORT" ; |
| | | public static final String FTP_USERNAME ="FTP_USERNAME" ; |
| | | public static final String FTP_PWD ="FTP_PWD" ; |
| | | public static final String FTP_RESOURCE_PATH ="FTP_RESOURCE_PATH" ; |
| | | public static final String ERP_ORGLIST_URL ="ERP_ORGLIST_URL" ; |
| | | public static final String ERP_USERLIST_URL ="ERP_USERLIST_URL" ; |
| | | public static final String ERP_APPROVE_URL ="ERP_APPROVE_URL" ; |
| | | public static final String ERP_USERSTATUS_RL ="ERP_USERSTATUS_RL" ; |
| | | public static final String ERP ="ERP" ; |
| | | public static final Integer THREE =3 ; |
| | | public static final Integer FOUR =4 ; |
| | | public static final String ORG_USER_ORIGIN = "ORG_USER_ORIGIN"; |
| | | public static boolean DEALING_HK_SYNCPRIVILEGE= false; |
| | | public static boolean DEALING_HK_SYNCDEVICE = false; |
| | | public static boolean DEALING_HK_SYNCPARK = false; |
| | | public static boolean DEALING_HK_IMG = false; |
| | | public static boolean DEALING_HK_ORG = false; |
| | | public static boolean DEALING_HK_USER = false; |
| | | public static boolean DEALING_HK_VISIT = false; |
| | | public static boolean DEALING_HK_EMPOWER = false; |
| | | public static boolean DEALING_HK_EMPOWER_DETAIL = false; |
| | | public static boolean DEALING_HK_EMPOWER_RESULT = false; |
| | | public static boolean DEALING_HK_PARKBOOK = false; |
| | | // ERP接口配置 |
| | | public static final String ERP_CONFIG = "ERP_CONFIG"; |
| | | // ERP ACCESS_KEY |
| | | public static final String ERP_ACCESS_KEY = "ERP_ACCESS_KEY"; |
| | | // ERP ACCESS_SECRET |
| | | public static final String ERP_ACCESS_SECRET = "ERP_ACCESS_SECRET"; |
| | | |
| | | // 内部人员冻结配置时间 |
| | | public static final String TIMEOUT_FREEZE = "TIMEOUT_FREEZE"; |
| | | |
| | | // FTP文件服务器资源访问地址 |
| | | |
| | | public static Date getBirthdyByCardNo(String idCard){ |
| | | if(idCard ==null || idCard.length()<14){ |
| | | return null; |
| | | } |
| | | Date birthday = null; // 解析为日期对象 |
| | | 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 Integer getSexByCardNo(String idCard){ |
| | | if(idCard ==null || idCard.length()<17){ |
| | | return null; |
| | | } |
| | | String str = idCard.substring(16, 17); // 截取身份证号的前六位数字作为出生日期 |
| | | try { |
| | | Integer num = Integer.parseInt(str); |
| | | return (num % 2 !=0) ? 1:2 ; |
| | | } catch (Exception e) { |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 判断是否为有效车牌号 |
| | | */ |
| | | public static boolean checkCarNo(String str) { |
| | | String patt="^[京津沪冀晋辽吉黑苏浙皖闽赣鲁豫鄂湘粤桂琼川黔云渝藏陕陇青宁新闽粤晋琼使领A_Z]{1}[A_Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$"; |
| | | Pattern r = Pattern.compile(patt); |
| | | Matcher matcher = r.matcher(str); |
| | | return matcher.find(); |
| | | } |
| | | |
| | | 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 |
| | |
| | | String activity_looknum = "looknum"; |
| | | String activity_signup = "signup"; |
| | | } |
| | | public interface DeviceRoleType{ |
| | | int lw = 0;//劳务访客 |
| | | int fk = 1;//普通访客 |
| | | int nb = 2;//内部访客 |
| | | } |
| | | public interface VisitStatus{ |
| | | //审核状态 0待审核 1已提交ERP审批 2审核通过 3审核不通过 4取消 5下发成功 6下发失败 7已签离 |
| | | int waitCheck = 0; |
| | | int submitCheck = 1; |
| | | int pass = 2; |
| | | int noPass = 3; |
| | | int cancel = 4; |
| | | int xfSuccess = 5; |
| | | int xfFail = 6; |
| | | int signout = 7; |
| | | } |
| | | public interface EmpowerStatus{ |
| | | //一卡通授权下发状态 0待下发 1已下发 2下发成功 3已取消 4下发失败 5任务下载已结束 |
| | | int wait = 0; |
| | | int ing = 1; |
| | | int pass = 2; |
| | | int cancel = 3; |
| | | int fail = 4; |
| | | int downloaded = 5; |
| | | } |
| | | public interface DOOR_ROLE_TYPE{ |
| | | int lw = 0; |
| | | int fk = 1; |
| | |
| | | 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"; |
| | | public static final String COFFEE_ARTICLE = "COFFEE_ARTICLE"; |
| | | |
| | | public static final String ACCESS_KEY = "ACCESS_KEY"; |
| | | 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 HOME_IMAGE ="HOME_IMAGE"; |
| | | |
| | | 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"; |
| | | public static final String WX_PLATFORM_AUDIT_VISIT = "WX_PLATFORM_AUDIT_VISIT"; |
| | | public static final String WX_PLATFORM_PREFIX = "WX_PLATFORM_PREFIX"; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public interface RedisKeys { |
| | | public static final String ERP_TOKEN ="ERP_TOKEN"; |
| | | public static final long EXPIRE_TIME = 7200; |
| | | |
| | | public static final String INTERNAL_TOKEN ="INTERNAL_TOKEN"; |
| | | |
| | | public static final String GOODSORDER_KEY = "ordercode_"; |
| | | 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) { |
| | |
| | | return d.longValue(); |
| | | } |
| | | |
| | | public interface UserRelObjType{ |
| | | int objTypeRoom = 0; |
| | | int objTypeBook = 1; |
| | | |
| | | public interface memberType{ |
| | | int lw_visitor = 0;//劳务访客 |
| | | int visitor = 1;//普通访客 |
| | | int internal = 2;//内部人员 |
| | | } |
| | | public interface RoomRecordObjType{ |
| | | int objTypeRoom = 0;//管理员开门 |
| | | int objTypeBook_in = 1;//参会人员开门 |
| | | int objTypeBook_out = 2;//访客开门 |
| | | |
| | | |
| | | public interface approveStatus{ |
| | | int wait = 0;//待审批 |
| | | int auditIng = 1;//审批中 |
| | | int pass = 2;//审批通过 |
| | | int unPass = 3;//审批未通过 |
| | | int otherDeal = 4;//他人已处理 |
| | | } |
| | | |
| | | |
| | | 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); |
| | | } |
| | | /** |
| | | * 用户类型 |
| | | */ |
| | | public enum UserType { |
| | | |
| | | SYSTEM(0, "系统用户", "管理员",Arrays.asList(0)), |
| | | ORG(1, "机构", "机构",Arrays.asList(1)), |
| | | CREATION(2, "创作中心", "创作中心",Arrays.asList(2)) |
| | | |
| | | ; |
| | | // 成员变量 |
| | | private String name; |
| | | private int key; |
| | | private List<Integer> historyStatus; |
| | | private String noteinfo;// 描述 |
| | | |
| | | // 构造方法 |
| | | UserType(int key, String name, String noteinfo,List<Integer> historyStatus) { |
| | | this.name = name; |
| | | this.key = key; |
| | | this.noteinfo = noteinfo; |
| | | this.historyStatus=historyStatus; |
| | | } |
| | | |
| | | // 普通方法 |
| | | public static String getName(int index) { |
| | | for (UserType c : UserType.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.name; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // 普通方法 |
| | | public static String getInfo(int index) { |
| | | for (UserType c : UserType.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.noteinfo; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | // 普通方法 |
| | | public static List<Integer> getHistoryStatus(int index) { |
| | | for (UserType c : UserType.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.historyStatus; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // get set 方法 |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public int getKey() { |
| | | return key; |
| | | } |
| | | public List<Integer> getHistoryStatus() { |
| | | return historyStatus; |
| | | } |
| | | |
| | | public void setKey(int key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | public String getNoteinfo() { |
| | | return noteinfo; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 数据状态枚举 |
| | |
| | | |
| | | /** 用户启用禁用枚举值*/ |
| | | ENABLE(0,"正常"), |
| | | DISABLE(1,"禁用"); |
| | | DISABLE(1,"禁用"), |
| | | FREEZE(2,"拉黑/冻结"), |
| | | |
| | | /** 用户类型 **/ |
| | | LW_FK(0,"劳务访客"), |
| | | PT_FK(1,"普通访客"), |
| | | NB_FK(2,"内部人员"), |
| | | |
| | | /** 进场类型 **/ |
| | | OUT(0,"出"), |
| | | IN(1,"进"); |
| | | |
| | | private Integer value; |
| | | private String des; |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 关联对象类型 0活动轮播图 1活动详情图 2门店评价3订单评价 4平台商品轮播 5探店多图 6店铺新鲜事多图 7商家图片多图 |
| | | * 对象驼峰属性转下划线 |
| | | * @param object |
| | | * @return |
| | | * @throws JsonProcessingException |
| | | */ |
| | | public enum MultiFile{ |
| | | ACTIVITY_ROTATION(0, "活动轮播图", "活动轮播图"), |
| | | ACTIVITY_DETAIL(1, "活动详情图", "活动详情图"), |
| | | SHOP_APPRAISE(2, "门店评价", "门店评价"), |
| | | ORDER_APPRAISE(3, "订单评价", "订单评价"), |
| | | PLATFORM_GOOD_ROTATION(4, "平台商品轮播", "平台商品轮播"), |
| | | TANDIAN_PICTURE(5, "探店多图", "探店多图"), |
| | | SHOP_HOT_PICTURE(6, "店铺新鲜事多图", "店铺新鲜事多图"), |
| | | SHOP_PICTURE(7, "商家图片多图", "商家图片多图"), |
| | | AFTERSALE_APPLY(8, "申请售后补充说明附件", "申请售后补充说明附件"), |
| | | AFTERSALE_KD(9, "申请售后邮寄说明附件", "申请售后邮寄说明附件"), |
| | | ; |
| | | // 成员变量 |
| | | private String name; |
| | | private int key; |
| | | private String noteinfo;// 描述 |
| | | |
| | | // 构造方法 |
| | | MultiFile(int key, String name, String noteinfo) { |
| | | this.name = name; |
| | | this.key = key; |
| | | this.noteinfo = noteinfo; |
| | | } |
| | | |
| | | // 普通方法 |
| | | public static String getName(int index) { |
| | | for (MultiFile c : MultiFile.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.name; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // 普通方法 |
| | | public static String getInfo(int index) { |
| | | for (MultiFile c : MultiFile.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 static String toUnderlineJSONString(Object object) throws JsonProcessingException { |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | mapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE); |
| | | mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); |
| | | String reqJson = mapper.writeValueAsString(object); |
| | | return reqJson; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 订单管理 |
| | | * 状态 0申请中 1已支付 2已取消 |
| | | */ |
| | | public enum ActivitySignupStatus{ |
| | | APPLY_ING(0, "申请中", "申请中"), |
| | | PAY_DONE(1, "已支付", "已支付"), |
| | | CANCEL(2, "已取消", "已取消"), |
| | | ; |
| | | // 成员变量 |
| | | private String name; |
| | | private int key; |
| | | private String noteinfo;// 描述 |
| | | |
| | | // 构造方法 |
| | | ActivitySignupStatus(int key, String name, String noteinfo) { |
| | | this.name = name; |
| | | this.key = key; |
| | | this.noteinfo = noteinfo; |
| | | } |
| | | |
| | | // 普通方法 |
| | | public static String getName(int index) { |
| | | for (ActivitySignupStatus c : ActivitySignupStatus.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.name; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // 普通方法 |
| | | public static String getInfo(int index) { |
| | | for (ActivitySignupStatus c : ActivitySignupStatus.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 static <T> T toSnakeObject(String json, Class<T> clazz) throws IOException { |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | mapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE); |
| | | T reqJson = mapper.readValue(json, clazz); |
| | | return reqJson; |
| | | } |
| | | |
| | | /** |
| | | * 售后状态 |
| | | * 状态 0待处理 1待邮寄 2已寄出 3商家已退款 4商家已发货5售后已完成6商家拒绝 7已取消 |
| | | */ |
| | | public enum AftersaleStatus{ |
| | | APPLY_ING(0, "待处理", "待处理"), |
| | | WAIT_SEND(1, "待邮寄", "待邮寄"), |
| | | SENDED(2, "客户已寄出", "客户已寄出"), |
| | | REFUND(3, "已退款", "已退款"), |
| | | SHOP_SENDED(4, "平台已发货", "平台已发货"), |
| | | DONE(5, "售后已完成", "售后已完成"), |
| | | SHOP_REFUSE(6, "已拒绝", "平台拒绝"), |
| | | CANCEL(7, "已取消", "客户取消售后"), |
| | | |
| | | |
| | | ; |
| | | // 成员变量 |
| | | private String name; |
| | | private int key; |
| | | private String noteinfo;// 描述 |
| | | |
| | | // 构造方法 |
| | | AftersaleStatus(int key, String name, String noteinfo) { |
| | | this.name = name; |
| | | this.key = key; |
| | | this.noteinfo = noteinfo; |
| | | } |
| | | |
| | | // 普通方法 |
| | | public static String getName(int index) { |
| | | for (AftersaleStatus c : AftersaleStatus.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.name; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // 普通方法 |
| | | public static String getInfo(int index) { |
| | | for (AftersaleStatus c : AftersaleStatus.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; |
| | | } |
| | | |
| | | } |
| | | /** |
| | | * 售后类型 |
| | | * 售后类型 0退款 1退货退款 2换货 |
| | | */ |
| | | public enum AftersaleType{ |
| | | TK(0, "退款", "退款"), |
| | | THTK(1, "退货退款", "退货退款"), |
| | | HH(2, "换货", "换货"), |
| | | ; |
| | | // 成员变量 |
| | | private String name; |
| | | private int key; |
| | | private String noteinfo;// 描述 |
| | | |
| | | // 构造方法 |
| | | AftersaleType(int key, String name, String noteinfo) { |
| | | this.name = name; |
| | | this.key = key; |
| | | this.noteinfo = noteinfo; |
| | | } |
| | | |
| | | // 普通方法 |
| | | public static String getName(int index) { |
| | | for (AftersaleType c : AftersaleType.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.name; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // 普通方法 |
| | | public static String getInfo(int index) { |
| | | for (AftersaleType c : AftersaleType.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; |
| | | } |
| | | |
| | | } |
| | | /** |
| | | * 订单管理 |
| | | * 状态 0待支付 1待发货 2待收货 3交易完成 4已关闭 5部分发货 |
| | | */ |
| | | public enum OrderStatus{ |
| | | WAIT_PAY(0, "待支付", "待支付"), |
| | | PAY_DONE(1, "待发货", "已支付代发货"), |
| | | WAIT_RECEIVE(2, "待收货", "已发货待收货"), |
| | | DONE(3, "交易完成", "交易完成"), |
| | | CLOSE(4, "已关闭", "已关闭"), |
| | | PART_DONE(5, "部分发货", "部分发货"), |
| | | |
| | | |
| | | ; |
| | | // 成员变量 |
| | | private String name; |
| | | private int key; |
| | | private String noteinfo;// 描述 |
| | | |
| | | // 构造方法 |
| | | OrderStatus(int key, String name, String noteinfo) { |
| | | this.name = name; |
| | | this.key = key; |
| | | this.noteinfo = noteinfo; |
| | | } |
| | | |
| | | // 普通方法 |
| | | public static String getName(int index) { |
| | | for (OrderStatus c : OrderStatus.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.name; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // 普通方法 |
| | | public static String getInfo(int index) { |
| | | for (OrderStatus c : OrderStatus.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; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 订单类型 |
| | | * 订单类型 0平台商城 1咖豆商城 2咖啡计划编码 |
| | | */ |
| | | public enum OrderType{ |
| | | ADMINPLAT(0, "平台商城 ", "平台商城 "), |
| | | KADOUPLAT(1, "咖豆商城", "咖豆商城"), |
| | | COFFERPLAN(2, "2咖啡计划编码", "2咖啡计划编码") |
| | | |
| | | |
| | | ; |
| | | // 成员变量 |
| | | private String name; |
| | | private int key; |
| | | private String noteinfo;// 描述 |
| | | |
| | | // 构造方法 |
| | | OrderType(int key, String name, String noteinfo) { |
| | | this.name = name; |
| | | this.key = key; |
| | | this.noteinfo = noteinfo; |
| | | } |
| | | |
| | | // 普通方法 |
| | | public static String getName(int index) { |
| | | for (OrderType c : OrderType.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.name; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // 普通方法 |
| | | public static String getInfo(int index) { |
| | | for (OrderType c : OrderType.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 ShareType{ |
| | | // 0活动1探店2咨询3店铺 4商品5分享邀请海报 |
| | | SHARE_ACTIVITY_ACTIVITY(0,"活动","活动"), |
| | | SHARE_ACTIVITY_VISITSHOP(1,"探店","咨询"), |
| | | SHARE_ACTIVITY_NEW(2,"咨询","咨询"), |
| | | SHARE_SHOP(3,"店铺","店铺" ), |
| | | SHARE_GOODS(4,"商品","商品"), |
| | | SHARE_POSTER(5,"分享邀请海报","分享邀请海报") |
| | | |
| | | ; |
| | | private Integer key; |
| | | |
| | | private String name; |
| | | |
| | | private String des; |
| | | |
| | | ShareType(Integer key, String name, String des) { |
| | | this.key = key; |
| | | this.name = name; |
| | | this.des = des; |
| | | } |
| | | |
| | | public Integer getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public void setKey(Integer key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getDes() { |
| | | return des; |
| | | } |
| | | |
| | | public void setDes(String des) { |
| | | this.des = des; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 咖豆任务 |
| | | */ |
| | | public enum CoffeeBeanTask{ |
| | | |
| | | SIGN_BOARD(1,"SIGN_BOARD","每日签到"), |
| | | SHARE_INFO(6,"SHARE_INFO","分享资讯"), |
| | | SHARE_INVITE_BILL(2,"SHARE_INVITE_BILL","分享邀请海报"), |
| | | INVITE_USER_LOGIN(3,"INVITE_USER_LOGIN","邀请新用户注册"), |
| | | EXCHANGE_GOODS(4,"INVITE_USER_LOGIN","兑换商品"), |
| | | EXCHANGE_COUPON(5,"INVITE_USER_LOGIN","兑换优惠券"), |
| | | POST_COMMENTS(7,"POST_COMMENTS","发布评论"), |
| | | COFFEE_MAP_CONSUME(8,"COFFEE_MAP_CONSUME","咖啡地图消费"), |
| | | ; |
| | | |
| | | // 0平台注册 1签到 2分享邀请 3邀请新用户 4兑换商品 5兑换优惠券 |
| | | // 成员变量 |
| | | private Integer key; |
| | | |
| | | private String name; |
| | | |
| | | private String des;// 描述 |
| | | |
| | | CoffeeBeanTask(Integer key, String name, String des) { |
| | | this.key = key; |
| | | this.name = name; |
| | | this.des = des; |
| | | } |
| | | |
| | | public Integer getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public void setKey(Integer key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getDes() { |
| | | return des; |
| | | } |
| | | |
| | | public void setDes(String des) { |
| | | this.des = des; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public enum NoticeType{ |
| | | |
| | | // 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,"平台扣款","平台扣款",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; |
| | | } |
| | | |
| | | } |
| | | } |