kimi42345
2020-03-17 6c6fdb4db59a2a2343e43ffd73a07f17b057c4fa
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
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 INSERT_SUCCESS = new CodeMsg(1001,"插入成功");
    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,"更新成功");
    public static CodeMsg DELETE_ERROR = new CodeMsg(1007,"删除失败");
    public static CodeMsg DELETE_SUCCESS = new CodeMsg(1008,"删除成功");
    public static CodeMsg ERROR_PARAMS_NOT_MATHED = new CodeMsg(1009,"参数不匹配");
    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 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;
    }
 
}