- 优化:error 实现 ServiceExceptionUtil.Enumerable
This commit is contained in:
parent
09eba0d21d
commit
739afb86e3
@ -0,0 +1,34 @@
|
||||
package cn.iocoder.mall.user.biz.enums;
|
||||
|
||||
import cn.iocoder.common.framework.util.ServiceExceptionUtil;
|
||||
|
||||
/**
|
||||
* 错误码枚举类
|
||||
*
|
||||
* 用户系统,使用 1-001-000-000 段
|
||||
*/
|
||||
public enum UserErrorCodeEnum implements ServiceExceptionUtil.Enumerable {
|
||||
|
||||
// ========== 用户地址 ==========
|
||||
USER_ADDRESS_NOT_EXISTENT(1001004000, "用户地址不存在!"),
|
||||
USER_ADDRESS_IS_DELETED(1001004001, "用户地址已被删除!"),
|
||||
USER_GET_ADDRESS_NOT_EXISTS(1001004002, "获取的地址不存在!"),
|
||||
;
|
||||
|
||||
private final int code;
|
||||
private final String message;
|
||||
|
||||
UserErrorCodeEnum(int code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
/**
|
||||
* author: sin
|
||||
* time: 2020/5/3 8:29 下午
|
||||
*/
|
||||
package cn.iocoder.mall.user.biz.enums;
|
Loading…
Reference in New Issue
Block a user