kimi
2020-05-27 c007f0ca1785db093d48f4846cda82fe8e955765
1
2
3
4
5
6
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
package com.highdatas.mdm.pojo;
 
/**
 * @author kimi
 * @description
 * @date 2019-12-11 14:39
 */
 
 
public class CodeMsg {
    private int code;
    private String msg;
    private boolean success;
    //错误码
    public static CodeMsg SUCCESS = new CodeMsg(2000,"success", true);
    public static CodeMsg Client_fail = new CodeMsg(7001,"请求外部链接失败");
    public static CodeMsg ERROR_TOKEN = new CodeMsg(1000,"找不到token");
    public static CodeMsg ERROR_SAVE_TOKEN = new CodeMsg(4001,"连接redis失败");
    public static CodeMsg ERROR_FIND_TOKEN = new CodeMsg(4002,"校验token失败,token已失效");
    public static CodeMsg INSERT_SUCCESS = new CodeMsg(1001,"插入成功", true);
    public static CodeMsg INSERT_ERROR = new CodeMsg(1002,"插入失败");
    public static CodeMsg SELECT_ERROR = new CodeMsg(1003,"查询失败");
    public static CodeMsg SELECT_ERROR_NOTFOUND = new CodeMsg(1004,"查不到当前数据");
    public static CodeMsg UPDATE_ERROR = new CodeMsg(1005,"更新失败");
    public static CodeMsg UPDATE_SUCCESS = new CodeMsg(1006,"更新成功",true);
    public static CodeMsg DELETE_ERROR = new CodeMsg(1007,"删除失败");
    public static CodeMsg DELETE_SUCCESS = new CodeMsg(1008,"删除成功",true);
    public static CodeMsg ERROR_PARAMS_NOT_MATHED = new CodeMsg(1009,"参数不匹配");
    public static CodeMsg ERROR_SIZE_TOO_LONG = new CodeMsg(1011,"数据条数过大");
    public static CodeMsg USER_NOT_MATHED = new CodeMsg(1010,"找不到登陆用户");
    public static CodeMsg ERROR_ACTIVITI_NEXTTASK = new CodeMsg(1011,"审批流出现错误,未获取到下一节点");
    public static CodeMsg OPERATR_ERROR = new CodeMsg(2001,"操作失败");
    public static CodeMsg TIMOUT_ERROR = new CodeMsg(4009,"等待时间过长");
    public static CodeMsg REPEAT_ERROR = new CodeMsg(4010,"重复提交");
    public static CodeMsg EMPTY_ERROR = new CodeMsg(10013,"未获取到数据");
    public static CodeMsg CREATE_ERROR = new CodeMsg(10014,"创建失败");
    public static CodeMsg AES_ERROR = new CodeMsg(4003,"获取AES密钥失败");
    public static CodeMsg SUBSCRIBE_SAVE_ERROR = new CodeMsg(4004,"订阅保存失败");
    public static CodeMsg SUBSCRIBE_DEL_ERROR = new CodeMsg(4006,"订阅删除失败");
    public static CodeMsg SUBSCRIBE_UPDATE_ERROR = new CodeMsg(4007,"订阅删除失败");
    public static CodeMsg SUBSCRIBE_UN_ERROR = new CodeMsg(4008,"数据未订阅");
    public static CodeMsg Active_UN_ERROR = new CodeMsg(4008,"数据未启用");
    public static CodeMsg ADDQUEUE_SUCCESS = new CodeMsg(4010,"添加到分发队列",true);
    public static CodeMsg ADDQUEUE_OVER = new CodeMsg(4012,"分发队列已满,暂不能添加");
    public static CodeMsg ADDQUEUE_FAIL = new CodeMsg(4011,"添加分发队列失败");
    public static CodeMsg MAINTAIN_UNFOUND_ERROR = new CodeMsg(4005,"未查到版本数据,或无权限");
 
    public CodeMsg(int code, String msg) {
        this.code = code;
        this.msg = msg;
        this.success = false;
    }
    public CodeMsg(int code, String msg,boolean success) {
        this.code = code;
        this.msg = msg;
        this.success = success;
    }
 
    public boolean isSuccess() {
        return success;
    }
 
    public void setSuccess(boolean success) {
        this.success = success;
    }
 
    public int getCode() {
        return code;
    }
 
    public void setCode(int code) {
        this.code = code;
    }
 
    public String getMsg() {
        return msg;
    }
 
    public void setMsg(String msg) {
        this.msg = msg;
    }
 
}