Blame view

Code.java 989 Bytes
涂亚平 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
package com.subsidy.common.constant;

import lombok.Getter;

@Getter
public enum Code {

    USERNAMENOTFOUND(1001, "用户不存在"),
    BADCREDENTIALS(1002,"账户或者密码错误"),
    ACCOUNTEXPIRED(1003,"账户过期"),
    LOCKEDEXCEPTION(1004, "账户已锁定"),
    DISABLEDEXCEPTION(1005,"账户已禁用"),
    ACCESSDENIED(1006,"无权限访问"),
    AUTHENTICATION(1007,"身份验证异常"),
    NOHANDLERFOUND(1008,"找不到相应的视图处理器"),
    PARAM_INVALID(1009, "参数不合法"),
    TOKEN_EXCEPTION(1010, "无效的令牌"),
    TOKEN_EXPIRED(1011, "令牌已过期"),
    TOKEN_VERIFICATION_FAILED(1013, "令牌验证失败"),
    OSS_ERROR(1012, "OSS文件上传异常"),
    Network_ERROR(9000, "网络请求失败"),
    SERVER_INTERNAL_ERROR(99999, "服务器内部错误"),
    ;

    private Integer code;

    private String message;

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