Blame view

Code.java 1.15 KB
涂亚平 committed
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
package com.meishu.common;

public enum Code {

    USERNAMENOTFOUND(10001, "用户不存在"),
    BADCREDENTIALS(10002,"账户或者密码错误"),
    ACCOUNTEXPIRED(10003,"账户过期"),
    LOCKEDEXCEPTION(10004, "账户已锁定"),
    DISABLEDEXCEPTION(10005,"账户已禁用"),
    ACCESSDENIED(10006,"无权限访问"),
    AUTHENTICATION(10007,"身份验证异常"),
    NOHANDLERFOUND(10008,"找不到相应的视图处理器"),
    PARAM_INVALID(10009, "参数不合法"),
    TOKEN_EXCEPTION(10010, "Token不合法"),
    TOKEN_EXPIRED(10011, "Token已过期"),
    OSS_ERROR(10012, "OSS文件上传异常"),
    Network_ERROR(90000, "网络请求失败"),
    SERVER_INTERNAL_ERROR(99999, "服务器内部错误"),
    ;

    private Integer code;

    private String message;

    Code(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}