lizijie
2021-03-22 ebdacd7123e42c76cd7cb43938574cfeb0706250
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
package com.moral.constant;
 
/**
 * @ClassName ResponseCodeEnum
 * @Description TODO
 * @Author 陈凯裕
 * @Date 2021/3/17 11:19
 * @Version TODO
 **/
public enum ResponseCodeEnum {
 
    SUCCESS(0, "操作成功"),
    FAIL(-1, "操作失败"),
    PARAMETERS_IS_MISSING(-2, "参数不完整"),
    TOKEN_INVALID(-3, "token无效"),
    TOKEN_CREATE_ERROR(-4, "token生成错误"),
    ACCOUNT_NOT_EXIST(-5, "用户不存在"),
    ACCOUNT_EXIST(-6, "用户已经存在"),
    ACCOUNT_IS_DELETE(-7, "用户已经被删除"),
    PASSWORD_ERROR(-8, "密码错误"),
    MOBILE_INVALID(-9, "手机号无效"),
    EMAIL_INVALID(-10, "邮箱无效"),
    ACCOUNT_INVALID(-11, "用户名无效"),
    PASSWORD_INVALID(-12, "密码无效"),
    ACCOUNT_IS_EXPIRE(-13, "用户已过期"),
    GROUP_EXIST(-14, "组已存在"),
    ROLE_IS_EXPIRE(-15, "用户名无效"),
    ROLE_IS_NULL(-16, "密码无效"),
    MENU_IS_EXPIRE(-17, "用户已过期"),
    MENU_IS_NULL(-18, "组已存在")
 
    ;
    private final Integer code;
    private final String msg;
 
    ResponseCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
 
    public Integer getCode() {
        return code;
    }
 
    public String getMsg() {
        return msg;
    }
}