ResultEnum.java 1.66 KB
package vion.enums;

public enum ResultEnum {
    /**
     * 登录失败
     */
    LOGIN_ERROR(503, "Login Failed"),
    /**
     * 数据重复(目前没用)
     */
    DATA_ERROR(502, "The data is incorrect. There may be duplicate data. Please check the data"),
    /**
     * atoken校验失败
     */
    ATOKEN_ERROR(501, "atoken verification failed"),
    /**
     * 错误
     */
    ERROR(505, "Failed to update or add"),
    /**
     * 插入或更新时有失败的数据
     */
    SAVE_OR_UPDATE_ERROR(500, "Failed to save or update"),
    /**
     * 成功
     */
    SUCCESS(200, "success"),

    /**
     * 查询数据为空或是查询出错
     */
    SELECT_ERROR(506, "Data does not exist or search error"),

    /**
     * 查询分钟数据不是同一天
     */
    ISNOTSAMEDAY(507, "The time interval between entries is not one day"),

    /**
     * 参数不全或参数错误提示
     */
    FALSEPARAM(508, "Parameter error, please enter correct parameter"),

    ILLEGALPARAM(513, "The parameter contains illegal characters"),

    NOTVALIDMODIFYTIME(509, "The modification entered is not in the valid range"),

    TIMEOUTOFWEEKS(511, "The interval between start date and end date exceeds 7 days"),

    FREQUENCYERROR(512, "Interface requests are too frequent"),

    MARK_ERROR(514, "Mark failed"),
    IMAGE_ERROR(515, "The picture does not fit");

    private final Integer code;
    private final String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}