jiangping
2025-04-07 9552df0290118ebea2b840795fe3874be036841c
server/src/main/java/com/doumee/core/constants/Constants.java
@@ -7,10 +7,27 @@
/**
 * 框架级常量
 * @author Eva.Caesar Liu
 * @author  dm
 * @since 2025/03/31 16:44
 */
public interface Constants {
public class Constants {
    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 = "QYWX";
    public static final  Integer ONE = 1;
    public static final Integer TWO = 2;
    public static final Integer ZERO = 0;
    public static  boolean DEALING_COMPANY_SYNC = false ;
    public static  boolean DEALING_MEMBER_SYNC = false ;
    /**
     * 缓存Key
@@ -21,7 +38,7 @@
    /**
     * 操作类型,用于做接口验证分组
     */
    interface OperaType {
   public interface OperaType {
        /**
         * 创建
@@ -39,10 +56,32 @@
        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常量
     */
    interface Job {
    public interface Job {
        // jobId在JOB实例中的存储参数键
        String JOB_DATA_MAP_JOB_ID = "JOB_ID";
@@ -53,11 +92,11 @@
        @Getter
        @AllArgsConstructor
        enum JobStatus {
            PAUSE((byte) -1, "暂停"),
            READY((byte) 0, "已准备"),
            RUNNING((byte) 1, "运行中"),
            PAUSE( -1, "暂停"),
            READY(  0, "已准备"),
            RUNNING( 1, "运行中"),
            ;
            private byte code;
            private int code;
            private String remark;
        }
@@ -67,12 +106,12 @@
        @Getter
        @AllArgsConstructor
        enum SnippetStatus {
            READY((byte) 0, "已准备"),
            RUNNING((byte) 1, "运行中"),
            SUCCESS((byte) 2, "执行成功"),
            FAILED((byte) -2, "执行失败"),
            READY((int) 0, "已准备"),
            RUNNING((int) 1, "运行中"),
            SUCCESS((int) 2, "执行成功"),
            FAILED((int) -2, "执行失败"),
            ;
            private byte code;
            private int code;
            private String remark;
        }
@@ -82,12 +121,12 @@
        @Getter
        @AllArgsConstructor
        enum LogStatus {
            FAILED((byte) 0, "执行失败"),
            SUCCESS((byte) 1, "执行成功"),
            IGNORE((byte) 2, "跳过"),
            NONE((byte) -1, "执行中"),
            FAILED((int) 0, "执行失败"),
            SUCCESS((int) 1, "执行成功"),
            IGNORE((int) 2, "跳过"),
            NONE((int) -1, "执行中"),
            ;
            private byte code;
            private int code;
            private String remark;
        }
@@ -110,13 +149,13 @@
     */
    @Getter
    @AllArgsConstructor
    enum ExceptionLevel {
        DANGER((byte)10, "高"),
        WARN((byte)5, "中"),
        LOW((byte)0, "低"),
  public  enum ExceptionLevel {
        DANGER((int)10, "高"),
        WARN((int)5, "中"),
        LOW((int)0, "低"),
        ;
        private byte level;
        private int level;
        private String remark;
    }
@@ -124,7 +163,7 @@
    /**
     * MyBatis自动注入忽略
     */
    interface Ignore {
    public interface Ignore {
        /**
         * 忽略时间,当不需要更新createTime/updateTime时,可使用该常量进行填充。
         */