From 739afb86e3cc1414951de85702cbfc66a1c386f5 Mon Sep 17 00:00:00 2001 From: fansili Date: Fri, 8 May 2020 10:43:14 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BC=98=E5=8C=96=EF=BC=9Aerror=20?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=20ServiceExceptionUtil.Enumerable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/biz/enums/UserErrorCodeEnum.java | 34 +++++++++++++++++++ .../mall/user/biz/enums/package-info.java | 5 --- 2 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 user/user-biz/src/main/java/cn/iocoder/mall/user/biz/enums/UserErrorCodeEnum.java delete mode 100644 user/user-biz/src/main/java/cn/iocoder/mall/user/biz/enums/package-info.java diff --git a/user/user-biz/src/main/java/cn/iocoder/mall/user/biz/enums/UserErrorCodeEnum.java b/user/user-biz/src/main/java/cn/iocoder/mall/user/biz/enums/UserErrorCodeEnum.java new file mode 100644 index 000000000..8d17f5a20 --- /dev/null +++ b/user/user-biz/src/main/java/cn/iocoder/mall/user/biz/enums/UserErrorCodeEnum.java @@ -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; + } + +} diff --git a/user/user-biz/src/main/java/cn/iocoder/mall/user/biz/enums/package-info.java b/user/user-biz/src/main/java/cn/iocoder/mall/user/biz/enums/package-info.java deleted file mode 100644 index b096c9f2e..000000000 --- a/user/user-biz/src/main/java/cn/iocoder/mall/user/biz/enums/package-info.java +++ /dev/null @@ -1,5 +0,0 @@ -/** - * author: sin - * time: 2020/5/3 8:29 下午 - */ -package cn.iocoder.mall.user.biz.enums; \ No newline at end of file