ResultStatus.java 998 Bytes
package com.xkl.config;

/**
 * 自定义请求状态码
 */
public enum ResultStatus {
    SUCCESS(100, "成功"),
    USERNAME_OR_PASSWORD_ERROR(-1001, "用户名或密码错误"),
    USER_NOT_FOUND(-1002, "用户不存在"),
    USER_NOT_LOGIN(-1004, "用户未登录"),
    USER_IS_EXIT(-1005, "用户已注册"),

    USER_LOGOUT(101,"修改密码成功,退出登录"),

    // 111开头的都是与amp报告上传软件相关的
    AMP_KEY_ERROR(-11100, "AMP密钥不匹配");

    /**
     * 返回码
     */
    private int code;

    /**
     * 返回结果描述
     */
    private String message;

    ResultStatus(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

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

    public String getMessage() {
        return message;
    }

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