| | |
| | | private static final String TOTAL_CREDIT = "${totalCredit}"; |
| | | private final ISmsTemplateService service; |
| | | |
| | | private static final Logger logger = LoggerFactory.getLogger("loginLogger"); |
| | | private static final Logger logger = LoggerFactory.getLogger("smsLogger"); |
| | | |
| | | private final SystemParamMapper systemParamMapper; |
| | | |
| | |
| | | throw new CommonException("短信模板不能为空"); |
| | | } |
| | | String content = template.getContent(); |
| | | logger.info("登录验证码日志: 短信模板配置参数{}",template); |
| | | if (StringUtils.isNotBlank(code)) { |
| | | content = content.replace(LOGIN_CODE, code); |
| | | } |
| | |
| | | public boolean sendMessage(String phone, String content) { |
| | | boolean success = false; |
| | | SystemParam defaultParam = systemParamMapper.getDefaultParam(); |
| | | logger.info("登录验证码日志: 系统配置参数{}",defaultParam); |
| | | if (defaultParam.getMessageSend() == 0) { |
| | | success = FirstMessage.sendMessage(phone, content); |
| | | if (!success) { |