错误码第一版
This commit is contained in:
@@ -87,6 +87,11 @@ public enum SystemErrorCodeEnum implements ServiceExceptionUtil.Enumerable {
|
||||
USER_ADDRESS_NOT_EXISTENT(1001004000, "用户地址不存在!"),
|
||||
USER_ADDRESS_IS_DELETED(1001004001, "用户地址已被删除!"),
|
||||
USER_GET_ADDRESS_NOT_EXISTS(1001004002, "获取的地址不存在!"),
|
||||
|
||||
// ========== 错误码模块 1002009000 ==========
|
||||
ERROR_CODE_NOT_EXISTS(1002009000, "错误码不存在"),
|
||||
ERROR_CODE_DUPLICATE(1002009001, "已经存在编码为【{}}】的错误码"),
|
||||
ERROR_CAN_NOT_UPDATE_SYSTEM_TYPE_ERROR(1002004003, "不能修改类型为系统内置的错误码"),
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package cn.iocoder.mall.system.biz.enums.errorcode;
|
||||
|
||||
/**
|
||||
* 错误码枚举,内置错误码是在 枚举中
|
||||
* @author ding
|
||||
*/
|
||||
public enum ErrorCodeTypeEnum {
|
||||
/**
|
||||
* 内置错误码
|
||||
*/
|
||||
SYSTEM(1),
|
||||
/**
|
||||
* 自定义错误码
|
||||
*/
|
||||
CUSTOM(2);
|
||||
|
||||
private final Integer type;
|
||||
|
||||
ErrorCodeTypeEnum(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user