错误码第一版

This commit is contained in:
benpaodeyouyusi
2020-05-09 21:19:17 +08:00
parent 016600ab2e
commit b24e45947b
21 changed files with 667 additions and 0 deletions

View File

@@ -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, "不能修改类型为系统内置的错误码"),
;

View File

@@ -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;
}
}