From be94f2979163600b3a5f719ea2cc09471b06a88b Mon Sep 17 00:00:00 2001 From: sin <2943460818@qq.com> Date: Thu, 16 May 2019 22:05:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20SmsFailException=EF=BC=8CS?= =?UTF-8?q?erviceException=20=E8=A2=AB=20final=20=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mall/admin/api/exception/SmsFailException.java | 14 -------------- .../iocoder/mall/admin/service/SmsServiceImpl.java | 14 +++++++------- 2 files changed, 7 insertions(+), 21 deletions(-) delete mode 100644 system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/exception/SmsFailException.java diff --git a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/exception/SmsFailException.java b/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/exception/SmsFailException.java deleted file mode 100644 index 631d8513f..000000000 --- a/system/system-service-api/src/main/java/cn/iocoder/mall/admin/api/exception/SmsFailException.java +++ /dev/null @@ -1,14 +0,0 @@ -package cn.iocoder.mall.admin.api.exception; - -import cn.iocoder.common.framework.exception.ServiceException; - -/** - * @author Sin - * @time 2019/5/16 11:17 AM - */ -public class SmsFailException extends ServiceException { - - public SmsFailException(Integer code, String message) { - super(code, message); - } -} diff --git a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/SmsServiceImpl.java b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/SmsServiceImpl.java index c65184024..836ee9eb9 100644 --- a/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/SmsServiceImpl.java +++ b/system/system-service-impl/src/main/java/cn/iocoder/mall/admin/service/SmsServiceImpl.java @@ -1,12 +1,12 @@ package cn.iocoder.mall.admin.service; import cn.iocoder.common.framework.constant.DeletedStatusEnum; +import cn.iocoder.common.framework.exception.ServiceException; import cn.iocoder.mall.admin.api.SmsPlatform; import cn.iocoder.mall.admin.api.SmsService; import cn.iocoder.mall.admin.api.bo.sms.SmsSignBO; import cn.iocoder.mall.admin.api.bo.sms.SmsTemplateBO; import cn.iocoder.mall.admin.api.constant.AdminErrorCodeEnum; -import cn.iocoder.mall.admin.api.exception.SmsFailException; import cn.iocoder.mall.admin.convert.SmsSignConvert; import cn.iocoder.mall.admin.convert.SmsTemplateConvert; import cn.iocoder.mall.admin.dao.SmsSignMapper; @@ -49,7 +49,7 @@ public class SmsServiceImpl implements SmsService { new QueryWrapper().eq("sign", sign)); if (smsSignDO != null) { - throw new SmsFailException(AdminErrorCodeEnum.SMS_SIGN_IS_EXISTENT.getCode(), + throw new ServiceException(AdminErrorCodeEnum.SMS_SIGN_IS_EXISTENT.getCode(), AdminErrorCodeEnum.SMS_SIGN_IS_EXISTENT.getMessage()); } @@ -73,7 +73,7 @@ public class SmsServiceImpl implements SmsService { new QueryWrapper().eq("sign", sign)); if (smsSignDO == null) { - throw new SmsFailException(AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getCode(), + throw new ServiceException(AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getCode(), AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getMessage()); } @@ -88,7 +88,7 @@ public class SmsServiceImpl implements SmsService { new QueryWrapper().eq("sign", oldSign)); if (smsSignDO == null) { - throw new SmsFailException(AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getCode(), + throw new ServiceException(AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getCode(), AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getMessage()); } @@ -113,7 +113,7 @@ public class SmsServiceImpl implements SmsService { new QueryWrapper().eq("id", smsSignId)); if (smsSignDO == null) { - throw new SmsFailException(AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getCode(), + throw new ServiceException(AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getCode(), AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getMessage()); } @@ -141,7 +141,7 @@ public class SmsServiceImpl implements SmsService { new QueryWrapper().eq("id", id)); if (smsTemplateDO == null) { - throw new SmsFailException(AdminErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getCode(), + throw new ServiceException(AdminErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getCode(), AdminErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getMessage()); } @@ -154,7 +154,7 @@ public class SmsServiceImpl implements SmsService { new QueryWrapper().eq("id", id)); if (smsTemplateDO == null) { - throw new SmsFailException(AdminErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getCode(), + throw new ServiceException(AdminErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getCode(), AdminErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getMessage()); }