package com.doumee.core.constants; import lombok.AllArgsConstructor; import lombok.Getter; import java.util.*; /** * 框架级常量 * @author dm * @since 2025/03/31 16:44 */ public class Constants { public static final String AZURE_BLOB ="AZURE_BLOB" ; public static final String AZURE_BLOB_ACCESSNAME ="AZURE_BLOB_ACCESSNAME" ; public static final String AZURE_BLOB_ACCESSKEY ="AZURE_BLOB_ACCESSKEY" ; public static final String AZURE_BLOB_ENDPOINT ="AZURE_BLOB_ENDPOINT" ; public static final String AZURE_BLOB_CONTAINER ="AZURE_BLOB_CONTAINER" ; 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 FTP_LOCAL_RESOURCE_PATH ="FTP_LOCAL_RESOURCE_PATH" ; public static final String QYWX_CORPID = "QYWX_CORPID"; public static final String QYWX_SECRET = "QYWX_SECRET"; public static final String QYWX_TOKEN = "QYWX_TOKEN"; public static final String QYWX_AGENTID = "QYWX_AGENTID"; public static final String QYWX_JS_API_TICKET = "QYWX_JS_API_TICKET"; public static final String JUMP_OUT_URL = "JUMP_OUT_URL"; public static final String SYSTEM ="SYSTEM" ; public static final String IMG_DIR = "IMG_DIR"; public static final String FILE_DIR ="FILE_DIR" ; public static final String FOOT_IMGURL ="FOOT_IMGURL" ; public static final String FOOT_IMGURL2 ="FOOT_IMGURL2" ; public static final String LINK_PHONE ="LINK_PHONE" ; public static final String LINK_MOBILE ="LINK_MOBILE" ; public static final String SERVER_TIME ="SERVER_TIME" ; public static final String ADDRESS ="ADDRESS" ; public static final String SOLVE_SCHEME ="SOLVE_SCHEME" ; public static final String WISDOM_SYSTEM ="WISDOM_SYSTEM" ; public static final String HONORS ="HONORS" ; public static final String YQLINKS ="YQLINKS" ; public static final String QYEMAIL ="QYEMAIL" ; public static final String FOOT_WORDS ="FOOT_WORDS" ; public static final String QYWX = "QYWX"; public static final Integer ONE = 1; public static final Integer TWO = 2; public static final Integer ZERO = 0; public static final Integer THREE = 3; public static final Integer FOUR = 4; public static final Integer SIX = 6; public static final Integer FIVE = 5; public static final String WEB_DOMAIN = "WEB_DOMAIN"; public static final String WEB_DOMAIN_MOBILE = "WEB_DOMAIN_MOBILE"; public static final String STATIC_PAGES_PATH_MOBILE ="STATIC_PAGES_PATH_MOBILE" ; public static final String STATIC_PAGES_PATH ="STATIC_PAGES_PATH" ; public static final String GIT_CODR_URL = "GIT_CODR_URL"; public static boolean WORKORDER_SHE_EMAIL_SENDING = false; public static boolean DEALING_COMPANY_SYNC = false ; public static boolean DEALING_MEMBER_SYNC = false ; public static final String WORKORDER_FILE_PATH ="WORKORDER_FILE_PATH" ; public static final String WORKORDER_LOG_FILE_PATH ="WORKORDER_LOG_FILE_PATH" ; public static final String REDIS_TOKEN_KEY = "token_"; @Getter public enum PageIndex { defaultPage( -1, "默认页", "default.html","default.html",-1), index( 0, "首页","index.html","index.html",0), zhxt( 1, "智慧场馆运营系统","intelligent_system.html","intelligent_system.html",1), zhxt2( 2, "智慧场馆运维系统","operation.html","operation.html",1), about( 3, "关于我们","about.html","about.html",5), operation( 4, "渠道合作","aboutChannel.html","aboutChannel.html",6), dynamics( 5, "最新动态","dynamics.html","dynamics.html",4), alot( 6, "alot物联","alot.html","alot.html",3), dynamicsDetail( 7, "最新动态详情","dynamics_details.html","dynamics/${id}.html",4), solution( 8, "解决方案-数智体育场馆","solution.html","solution.html",2), casesDetail( 9, "客户案例详情页","case_details.html","cases/${id}.html",0), solutioMeadowlands( 10, "解决方案-24H智能场馆","solution-meadowlands.html","solution-meadowlands.html",2), solutionSport( 11, "解决方案-景区&游乐园","solution-sport.html","solution-sport.html",2), solutionScenicSpot( 12, "解决方案-数智体育平台","solution-scenicSpot.html","solution-scenicSpot.html",2), solutionSpace( 13, "解决方案-空间智慧管理","solution-space.html","solution-space.html",2), bannerDetails( 14, "首页-轮播图详情","banner_details.html","banners/${id}.html",0), sozhtycg( 15, "解决方案-综合体育场馆(3级)","sozhtycg.html","sozhtycg.html",2), soqmjszx( 16, "解决方案-全民健身中心(3级)","soqmjszx.html","soqmjszx.html",2), soxytycg( 17, "解决方案-校园体育场馆(3级)","soxytycg.html","soxytycg.html",2), sobxtycg( 18, "解决方案-冰雪体育场馆(3级)","sobxtycg.html","sobxtycg.html",2), soyytycg( 19, "解决方案-游泳体育场馆(3级)","soyytycg.html","soyytycg.html",2), sozhtygy( 20, "解决方案-智慧体育公园(3级)","sozhtygy.html","sozhtygy.html",2), so24zncg( 21, "解决方案-24H智能场馆(3级)","so24zncg.html","so24zncg.html",2), sowrzscg( 22, "解决方案-无人值守场馆(3级)","sowrzscg.html","sowrzscg.html",2), sotylsyypt( 23, "解决方案-体育连锁运营平台(3级)","sotylsyypt.html","sotylsyypt.html",2), sossjsztypt( 24, "解决方案-省市级数智体育平台(3级)","sossjsztypt.html","sossjsztypt.html",2), soqzly( 25, "解决方案-亲子乐园(3级)","soqzly.html","soqzly.html",2), solyjq( 26, "解决方案-旅游景区(3级)","solyjq.html","solyjq.html",2), sogrwhg( 27, "解决方案-工人文化宫(3级)","sogrwhg.html","sogrwhg.html",2), soqyghg( 28, "解决方案-企业工会馆(3级)","soqyghg.html","soqyghg.html",2), sowyycg( 29, "解决方案-文艺演出馆(3级)","sowyycg.html","sowyycg.html",2) ; private int key; private String name; private String template; private String html; private int navIndex; PageIndex(int key, String name,String template,String html,int navIndex) { this.html = html; this.key = key; this.name = name; this.template = template; this.navIndex = navIndex; } public static PageIndex getObj(int index) { for (PageIndex c : PageIndex.values()) { if (c.getKey() == index) { return c; } } return defaultPage; } } @Getter public enum MobilePageIndex { defaultPage( -1, "默认页", "defaultMobile.html","defaultMobile.html",-1), index( 0, "首页","indexMobile.html","index.html",0), intelligentSystemMobile( 1, "智慧场馆运营系统","intelligentSystemMobile.html","intelligentSystemMobile.html",1), intelligentSystemYwMobile( 2, "智慧场馆运维系统","intelligentSystemYwMobile.html","intelligentSystemYwMobile.html",1), sportsVenueMobile( 3, "综合体育场馆","sportsVenueMobile.html","sportsVenueMobile.html",5), nationalFitnessMobile( 4, "全民健身中心","nationalFitnessMobile.html","nationalFitnessMobile.html",6), campusSportsMobile( 5, "校园体育场馆","campusSportsMobile.html","campusSportsMobile.html",4), IceSnowSportsMobile( 6, "冰雪体育场馆","IceSnowSportsMobile.html","IceSnowSportsMobile.html",3), swimmingSportsMobile( 7, "游泳体育场馆","swimmingSportsMobile.html","swimmingSportsMobile.html",4), smartSportsParkMobile( 8, "智慧体育公园","smartSportsParkMobile.html","smartSportsParkMobile.html",2), intelligentVenueMobile( 9, "24H智能场馆","intelligentVenueMobile.html","intelligentVenueMobile.html",0), unattendedMobile( 10, "无人值守场馆","unattendedMobile.html","unattendedMobile.html",2), soSmartVenueMobile( 11, "解决方案-数智体育场馆","soSmartVenueMobile.html","soSmartVenueMobile.html",2), soUnmannedVenueMobile( 12, "解决方案-无人场馆","soUnmannedVenueMobile.html","soUnmannedVenueMobile.html",2), soSportsPlatformMobile( 13, "解决方案-数智体育平台","soSportsPlatformMobile.html","soSportsPlatformMobile.html",2), soScenicAreaMobile( 14, "解决方案-景区&游乐园","soScenicAreaMobile.html","soScenicAreaMobile.html",2), soSmartSpaceMobile( 15, "解决方案-空间智慧管理","soSmartSpaceMobile.html","soSmartSpaceMobile.html",2), dynamicIndex( 16, "最新动态","dynamicMobile.html","dynamicMobile.html",4), dynamicDetail( 17, "最新动态详情","dynamicDetailMobile.html","dynamics/${id}.html",4), casesDetail( 18, "客户案例详情页","case_details.html","cases/${id}.html",0), cooperationMobile( 20, "渠道合作","cooperationMobile.html","cooperationMobile.html",0), aboutMobile( 21, "关于我们","aboutMobile.html","aboutMobile.html",0), dynamics( 22, "最新动态","dynamicListMobile.html","dynamicListMobile${type}.html",4), bannerDetails( 19, "首页-轮播图详情","banner_details.html","banners/${id}.html",0); private int key; private String name; private String template; private String html; private int navIndex; MobilePageIndex(int key, String name,String template,String html,int navIndex) { this.html = html; this.key = key; this.name = name; this.template = template; this.navIndex = navIndex; } public static MobilePageIndex getObj(int index) { for (MobilePageIndex c : MobilePageIndex.values()) { if (c.getKey() == index) { return c; } } return defaultPage; } } public interface uploadType{ String blob = "blob"; String ftp = "ftp"; } /** * 缓存Key */ interface CacheKey { } public interface RedisKeys { public static final String IMPORTING_CATEGORY = "IMPORTING_CATEGORY"; } /** * 操作类型,用于做接口验证分组 */ public interface OperaType { /** * 创建 */ interface Create {} /** * 修改 */ interface Update {} /** * 修改状态 */ interface UpdateStatus {} } public static boolean equalsInteger(Integer a, Integer b) { if (formatIntegerNum(a) == formatIntegerNum(b)) { return true; } return false; } public static int formatIntegerNum(Integer d) { if (d == null) { d = 0; } return d.intValue(); } public static long formatLongNum(Long d) { if (d == null) { d = 0L; } return d.longValue(); } /** * Job常量 */ public interface Job { // jobId在JOB实例中的存储参数键 String JOB_DATA_MAP_JOB_ID = "JOB_ID"; /** * JOB状态 */ @Getter @AllArgsConstructor enum JobStatus { PAUSE( -1, "暂停"), READY( 0, "已准备"), RUNNING( 1, "运行中"), ; private int code; private String remark; } /** * 分片状态 */ @Getter @AllArgsConstructor enum SnippetStatus { READY((int) 0, "已准备"), RUNNING((int) 1, "运行中"), SUCCESS((int) 2, "执行成功"), FAILED((int) -2, "执行失败"), ; private int code; private String remark; } /** * 分片状态 */ @Getter @AllArgsConstructor enum LogStatus { FAILED((int) 0, "执行失败"), SUCCESS((int) 1, "执行成功"), IGNORE((int) 2, "跳过"), NONE((int) -1, "执行中"), ; private int code; private String remark; } /** * 触发类型 */ @Getter @AllArgsConstructor enum TriggerType { SYSTEM("SYSTEM", "系统"), MANUAL("MANUAL", "手动"), ; private String code; private String remark; } } /** * 跟踪日志异常等级 */ @Getter @AllArgsConstructor public enum ExceptionLevel { DANGER((int)10, "高"), WARN((int)5, "中"), LOW((int)0, "低"), ; private int level; private String remark; } /** * MyBatis自动注入忽略 */ public interface Ignore { /** * 忽略时间,当不需要更新createTime/updateTime时,可使用该常量进行填充。 */ Date IGNORE_TIME = new IgnoreDate(); /** * 忽略用户,当不需要更新createUser/updateUser时,可使用该常量进行填充。 */ Integer IGNORE_USER = -1; /** * 忽略时间类 */ class IgnoreDate extends Date {} } /** * 文件附件类型 */ public interface multiFileType{ //0问题上报 1跌绊滑上报 2跌绊滑处理 3分配物业主管 4分配处理人 5DCA风险上报 6DCA风险处理 7DCA问题工单图片 // int sheUpload = 0; // int dbhUpload = 1; // int dbhDeal = 2; // int dbhAllocation = 3; // int dbhDealUser = 4; // int dcaUpload = 5; // int dcaDeal = 6; // int dcaWorkOrder= 7; //0工单上报 1工单处理 2工单转交 int upload = 0; int deal = 1; int passOn = 2; } public enum WorkOrderStatus{ waitConfirm( 0, "待分配WTS","{title}上报","","待分配WTS" ), waitAllocation(1, "待分配任务","待分配任务","","待分配任务"), waitDeal(2, "待处理","待处理","","待工程师处理"), sheClose(3, "已解决","SHE已关闭","","SHE已关闭"), wtsClose(4, "已解决","WTS已关闭","","WTS已关闭"), close(5, "已解决","已解决","","工程师关闭"), urge (6, "催促","","","") ; private int status; private String statusInfo; private String statusName; private String logTitle; private String noticeContent; // 构造方法 WorkOrderStatus(int status, String statusInfo,String logTitle,String noticeContent,String statusName ) { this.status = status; this.statusInfo = statusInfo; this.logTitle = logTitle; this.noticeContent = noticeContent; this.statusName = statusName; } public static String getName(int index) { for (WorkOrderStatus c : WorkOrderStatus.values()) { if (c.getKey() == index) { return c.statusInfo; } } return null; } public static String getStatusName(int index) { for (WorkOrderStatus c : WorkOrderStatus.values()) { if (c.getKey() == index) { return c.statusName; } } return null; } public int getKey() { return status; } public void setKey(int key) { this.status = status; } public int getStatus() { return status; } public void setStatus(int status) { this.status = status; } public String getStatusName() { return statusName; } public void setStatusName(String statusName) { this.statusName = statusName; } public String getStatusInfo() { return statusInfo; } public void setStatusInfo(String statusInfo) { this.statusInfo = statusInfo; } public String getLogTitle() { return logTitle; } public void setLogTitle(String logTitle) { this.logTitle = logTitle; } public String getNoticeContent() { return noticeContent; } public void setNoticeContent(String noticeContent) { this.noticeContent = noticeContent; } } }