Code.java 1.15 KB
package com.subsidy.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;
    }
}