ResultConstants.java 2.25 KB
Newer Older
yanzg's avatar
yanzg committed
1 2 3 4 5
package com.yanzuoguang.util.contants;

/**
 * 系统服务返回code静态常量类
 * 要求所有返回code不要相同,便于统一规范服务代码
yanzg's avatar
yanzg committed
6
 * @author 颜佐光
yanzg's avatar
yanzg committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
 */
public final class ResultConstants {
    /**
     * 成功 success
     */
    public static final String SUCCESS = "00";
    /**
     * 参数不正常
     */
    public static final String PARAM_INVALID = "01";
    /**
     * feign failed
     */
    public static final String FEIGN_FAILED = "02";
    /**
     * 接口鉴权不通过
     */
    public static final String SIGN_NO_PASS = "03";
    /**
     * 返回参数为空
     */
    public static final String RESULT_EMPTY = "04";
    /**
     * 文件上传异常
     */
    public static final String FILE_UPLOAD_ERROR = "98";
    /**
     * 系统异常
     */
    public static final String UNKNOW_ERROR = "99";

    /**
     * 数据业务返回码
     */
    public static class DataCode {

        /**
         * 数据已存在
         */
        public static final String DATA_CODE_1001 = "1001";

        /**
         * 数据不存在
         */
        public static final String DATA_CODE_1002 = "1002";

        /**
         * 数据查询失败
         */
        public static final String DATA_CODE_1003 = "1003";

        /**
         * 数据修改失败
         */
        public static final String DATA_CODE_1004 = "1004";

        /**
         * 数据删除失败
         */
        public static final String DATA_CODE_1005 = "1005";

        /**
         * 数据异常
         */
        public static final String DATA_CODE_1006 = "1006";

        /**
         * 数据已处理
         */
        public static final String  DATA_CODE_1007 = "1007";

        /**
         * 金额不足
         */
        public static final String DATA_CODE_1009 = "1009";


    }

    /**
     * 第三方资源返回码
     */
    public static class ThirdPartyCode {

        /**
         * 请求超时
         */
        public static final String THIRD_PARTY_CODE_2001 = "2001";

        /**
         * 读取超时
         */
        public static final String THIRD_PARTY_CODE_2002 = "2002";
        /**
         * 返回数据异常
         */
        public static final String THIRD_PARTY_CODE_2003 = "2003";

    }

}