SmsServiceImpl implements SmsService { @Override @Transactional public void addSign(String sign, Integer platform) { SmsSignDO smsSignDO = smsSignMapper.selectOne( new QueryWrapper<SmsSignDO>() .eq("platform", platform) .eq("sign", sign) ); if (smsSignDO != null) { throw new ServiceException(AdminErrorCodeEnum.SMS_SIGN_IS_EXISTENT.getCode(), AdminErrorCodeEnum.SMS_SIGN_IS_EXISTENT.getMessage()); } smsSignMapper.insert( (SmsSignDO) new SmsSignDO() .setSign(sign) .setPlatform(platform) .setApplyStatus(SmsApplyStatusEnum.SUCCESS.getValue()) .setDeleted(DeletedStatusEnum.DELETED_NO.getValue()) .setUpdateTime(new Date()) .setCreateTime(new Date()) ); }  @Override PageSmsSignBO pageSmsSign(PageQuerySmsSignDTO queryDTO); @Override PageSmsTemplateBO pageSmsTemplate(PageQuerySmsTemplateDTO queryDTO); @Override @Transactional void addSign(String sign, Integer platform); @Override SmsSignBO getSign(Integer signId); @Override @Transactional void updateSign(Integer id, String newSign, Integer platform); @Override void deleteSign(Integer id); @Override @Transactional void addTemplate(Integer smsSignId, String templateCode,
                            String template, Integer platform, Integer smsType); @Override SmsTemplateBO getTemplate(Integer id, Integer platform); @Override @Transactional void updateTemplate(Integer id, Integer smsSignId, String templateCode,
                               String template, Integer platform, Integer smsType); @Override @Transactional void deleteTemplate(Integer id); @Override void singleSend(String mobile, Integer smsTemplateId, Map<String, String> params); @Override void batchSend(List<String> mobileList, Integer smsTemplateId, Map<String, String> params);  }
@Test public void createSignTest() { smsService.addSign("登录确认验证码", SmsPlatformEnum.AliYun.getValue()); }