io.afu.utils.common.constant.ConstantEnum Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of utils Show documentation
Show all versions of utils Show documentation
RffanLAB Utils For Many Way use
package io.afu.utils.common.constant;
public enum ConstantEnum {
// 通用相关
OPERATION_SUCCESS("OPERATION_SUCCESS",0,"操作成功"),
OPERATION_FAILED("OPERATION_FAILED",-1,"操作失败"),
INTERNAL_ERROR("INTERNAL_ERROR",-2,"内部错误"),
// 用户相关
USER_NOT_EXIST("USER_NOT_EXIST",100001,"用户不存在"),
USER_PASS_NOT_MATCH("USER_PASS_NOT_MATCH",100002,"用户名密码不匹配"),
USER_PASS_ERR_EXCEED("USER_PASS_ERR_EXCEED",100003,"用户密码错误超过限额次数,IP和用户将被锁定"),
NOT_CHINA_MAINLAND_IDCARD("NOT_CHINA_MAINLAND_IDCARD",100004,"非中国大陆身份证号码"),
NOT_CHINA_MAINLAND_PHONE_NUM("NOT_CHINA_MAINLAND_PHONE_NUM",100005,"用户手机号码非中国大陆手机号码"),
USER_NOT_ACTIVED("USER_NOT_ACTIVED",100006,"该用户已经被冻结"),
BIRTH_YEAR_ILLEGAL("BIRTH_YEAR_ILLEGAL",100007,"用户出生日期不合法"),
IDCARD_ILLEGAL("IDCARD_ILLEGAL",100008,"身份证不合法"),
USER_SESSION_EXPIRED("USER_SESSION_EXPIRED",100009,"用户会话已经过期"),
// 参数相关常量
PARAM_NOT_SET("PARAM_NOT_SET",110001,"参数没有设置"),
PARAM_TYPE_ERROR("PARAM_TYPE_ERROR",110002,"参数类型错误"),
PARAM_ERROR("PARAM_ERROR",110003,"参数错误"),
// 系统相关常量
// API 系统相关常量
API_NOT_REG("API_NOT_REG",200001,"应用并未注册或者应用并没有启用。"),
API_ALREADY_EXIST("API_ALREADY_EXIST",200002,"应用已经存在同名应用请勿重复添加。"),
API_KEY_SECRET_NOT_MATCH("API_KEY_SECRET_NOT_MATCH",200003,"应用的Key和Secret 并不匹配。"),
API_REACH_LIMIT("API_REACH_LIMIT",200004,"API访问受限,访问次数受限。"),
API_NO_PERMISSION("API_NO_PERMISSION",200005,"没有权限访问该应用。"),
// 重定向相关
REDIRECTION_NOT_FOUND("REDIRECTION_NOT_FOUND",210001,"重定向并没有找到"),
// 操作系统相关常量
SERVICE_EXECUTE_PATH_MUST_BE_ABSOLUTE_PATH("SERVICE_EXECUTE_PATH_MUST_BE_ABSOLUTE_PATH",210001,"系统服务的启动路径必须是绝对路径"),
//文章相关 300000
POST_NOT_FOUND("POST_NOT_FOUND",300001,"文章并没有找到,请确认一下"),
POST_GRANT_NEEDED("POST_GRANT_NEED",300002,"文章需要授权才能访问"),
POST_ACCESS_DENIED("POST_ACCESS_DENIED",300003,"文章访问首先,该文章并不支持对外访问"),
// 机器人相关的错误
FILE_TO_CONVERT_NOT_FOUND("FILE_NOT_FOUND",600001,"需要转换的文件找不到"),
REMOTE_API_DEAD("REMOTE_API_DEAD",600002,"远程API挂了请联系管理员"),
// 运维相关 700000开始
// Nginx 相关
NGINX_UNIX_UPSTREAM_MUST_BE_UNIX_SOCK_FILE("NGINX_UNIX_UPSTREAM_MUST_BE_UNIX_SOCK_FILE",700001,"Nginx的反代目标的如果是unixsock必须是.sock的文件"),
// 企业相关
COMPANY_NOT_FOUND("COMPANY_NOT_FOUND",800001,"企业没找到"),
COMPANY_NOT_ACTIVED("COMPANY_NOT_ACTIVATED",800002,"该企业并没有激活"),
;
private String name;
private Integer code;
private String msg;
ConstantEnum(String name, Integer code, String msg) {
this.name = name;
this.code = code;
this.msg = msg;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
}