com.lx.constant.DefaultResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lxboot3 Show documentation
Show all versions of lxboot3 Show documentation
使用文档: https://a7fi97h1rc.feishu.cn/docx/X3LRdtLhkoXQ8hxgXDQc2CLOnEg?from=from_copylink
package com.lx.constant;
import com.lx.entity.Result;
public enum DefaultResult {
ERROR(20001, "接口异常"),
ACCESSERROR(20003, "权限不足"),
LOGINERROR(20002, "用户名或密码错误"),
REMOTEERROR(20004, "远程调用失败"),
REPERROR(20005, "重复操作"),
TOKERPAST(20006, "token过期"),
RESULT_SERVICE_ERR(50000, "自定义业务异常"),
SERVICE_ERR(50001, "业务异常"),
VIOLATION_ERR(50002, "参数验证异常"),
MISS_ERR(50003, "缺少参数异常"),
PARS_ERR(50004, "参数解析异常"),
NO_HADNLER_ERR(50005, "接口不存在"),
CALL_LIMIT(50006, "接口调用次数到达上限"),
VERSION_ERR(50007, "客户端与服务版本不一致"),
IP_LIMIT(50008,"IP访问受限")
;
private String message;
private Integer code;
DefaultResult(Integer code, String message) {
this.code = code;
this.message = message;
}
public Result getResult() {
return Result.err(this.code, this.message);
}
public Result setMessage(String message) {
return Result.err(this.code, message);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy