You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.4 KiB
64 lines
1.4 KiB
package com.jiagutech.common.exception;
|
|
|
|
import lombok.Getter;
|
|
|
|
@Getter
|
|
public enum BizCode {
|
|
General_Success(200, "接口调用成功"),
|
|
ServerError(10001, "服务器异常"),
|
|
General_Failure(10004, "接口调用失败"),
|
|
General_DBError(10005, "DB错误"),
|
|
General_ParameterInvalid(12001, "参数校验失败"),
|
|
/**
|
|
* 通用类
|
|
*/
|
|
USER_UNREGISTERED(12001, "用户未注册"),
|
|
NOT_FOUND(12002, "数据不存在"),
|
|
LOGIN_TYPE_ERROR(12005, "登录类型错误"),
|
|
|
|
|
|
/**
|
|
* 文件服务
|
|
*/
|
|
FILE_DOWNLOAD_ERROR(90001, "文件下载错误"),
|
|
|
|
FILE_UPLOAD_ERROR(90002, "文件上传失败"),
|
|
|
|
|
|
|
|
USER_NOT_FOUND(40004, "用户不存在"),
|
|
|
|
CAPTCHA_ERROR(40003, "验证码错误"),
|
|
|
|
PASSWORD_ERROR(40002, "密码错误"),
|
|
|
|
TOKEN_TIMEOUT_ERROR(40006, "token已过期"),
|
|
|
|
USER_STOP_FOUND(40008, "用户被禁用"),
|
|
USER_STATUS_ERROR(40009,"用户未审核通过"),
|
|
|
|
USER_NOT_LOGIN(40011, "用户未登录,请登录后再操作"),
|
|
|
|
ACCESS_TOKEN_INVALID(40040, "用户token无效,请重新登录"),
|
|
|
|
ACCESS_NOT_ALLOWABLE(50001, "服务不允许直接访问"),
|
|
|
|
PERMISSION_NOT_FOUND(40001,"该用户无操作权限"),
|
|
|
|
USER_PHONE_EXIST(40012, "用户手机号已存在"),
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
private final Integer code;
|
|
|
|
private final String msg;
|
|
|
|
BizCode(Integer code, String msg) {
|
|
this.code = code;
|
|
this.msg = msg;
|
|
}
|
|
|
|
}
|
|
|