删除 SmsFailException,ServiceException 被 final 了

This commit is contained in:
sin 2019-05-16 22:05:21 +08:00
parent 5f91289c88
commit be94f29791
2 changed files with 7 additions and 21 deletions

View File

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

View File

@ -1,12 +1,12 @@
package cn.iocoder.mall.admin.service; package cn.iocoder.mall.admin.service;
import cn.iocoder.common.framework.constant.DeletedStatusEnum; 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.SmsPlatform;
import cn.iocoder.mall.admin.api.SmsService; import cn.iocoder.mall.admin.api.SmsService;
import cn.iocoder.mall.admin.api.bo.sms.SmsSignBO; import cn.iocoder.mall.admin.api.bo.sms.SmsSignBO;
import cn.iocoder.mall.admin.api.bo.sms.SmsTemplateBO; import cn.iocoder.mall.admin.api.bo.sms.SmsTemplateBO;
import cn.iocoder.mall.admin.api.constant.AdminErrorCodeEnum; 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.SmsSignConvert;
import cn.iocoder.mall.admin.convert.SmsTemplateConvert; import cn.iocoder.mall.admin.convert.SmsTemplateConvert;
import cn.iocoder.mall.admin.dao.SmsSignMapper; import cn.iocoder.mall.admin.dao.SmsSignMapper;
@ -49,7 +49,7 @@ public class SmsServiceImpl implements SmsService {
new QueryWrapper<SmsSignDO>().eq("sign", sign)); new QueryWrapper<SmsSignDO>().eq("sign", sign));
if (smsSignDO != null) { 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()); AdminErrorCodeEnum.SMS_SIGN_IS_EXISTENT.getMessage());
} }
@ -73,7 +73,7 @@ public class SmsServiceImpl implements SmsService {
new QueryWrapper<SmsSignDO>().eq("sign", sign)); new QueryWrapper<SmsSignDO>().eq("sign", sign));
if (smsSignDO == null) { 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()); AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getMessage());
} }
@ -88,7 +88,7 @@ public class SmsServiceImpl implements SmsService {
new QueryWrapper<SmsSignDO>().eq("sign", oldSign)); new QueryWrapper<SmsSignDO>().eq("sign", oldSign));
if (smsSignDO == null) { 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()); AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getMessage());
} }
@ -113,7 +113,7 @@ public class SmsServiceImpl implements SmsService {
new QueryWrapper<SmsSignDO>().eq("id", smsSignId)); new QueryWrapper<SmsSignDO>().eq("id", smsSignId));
if (smsSignDO == null) { 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()); AdminErrorCodeEnum.SMS_SIGN_NOT_EXISTENT.getMessage());
} }
@ -141,7 +141,7 @@ public class SmsServiceImpl implements SmsService {
new QueryWrapper<SmsTemplateDO>().eq("id", id)); new QueryWrapper<SmsTemplateDO>().eq("id", id));
if (smsTemplateDO == null) { 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()); AdminErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getMessage());
} }
@ -154,7 +154,7 @@ public class SmsServiceImpl implements SmsService {
new QueryWrapper<SmsTemplateDO>().eq("id", id)); new QueryWrapper<SmsTemplateDO>().eq("id", id));
if (smsTemplateDO == null) { 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()); AdminErrorCodeEnum.SMS_TEMPLATE_NOT_EXISTENT.getMessage());
} }