| | |
| | | // String smsbao_sign = sysparaService.find("smsbao_sign").getValue(); |
| | | |
| | | // 短信发送文本[TEST]code is :{0} |
| | | String send_code_text = this.sysparaService.find("send_code_text").getSvalue(); |
| | | if (StringUtils.isNullOrEmpty(send_code_text)) { |
| | | logger.error("send_code_text 未配置"); |
| | | return; |
| | | } |
| | | String send_code_text; |
| | | |
| | | /** |
| | | * 是否每次发送的code都不一样 |
| | |
| | | } |
| | | // log.info(MessageFormat.format("target:{0},code:{1},ip:{2}", target, code, ip)); |
| | | |
| | | String content = MessageFormat.format("code is :{0}", new Object[] { code }); |
| | | String content = "[MetaEquityEX]"; |
| | | if (target.indexOf("@") == -1) { |
| | | |
| | | send_code_text = this.sysparaService.find("send_code_text").getSvalue(); |
| | | if (StringUtils.isNullOrEmpty(send_code_text)) { |
| | | logger.error("send_code_text 未配置"); |
| | | return; |
| | | } |
| | | /** |
| | | * 发送的短信接口类型 tiantian---天天---smsSendService--->>>>-- |
| | | * moduyun---摩杜云---smsSingleSender |
| | |
| | | } |
| | | |
| | | } else { |
| | | send_code_text = this.sysparaService.find("email_send_code_text").getSvalue(); |
| | | if (StringUtils.isNullOrEmpty(send_code_text)) { |
| | | logger.error("email_send_code_text 未配置"); |
| | | return; |
| | | } |
| | | /** |
| | | * 邮件 |
| | | */ |
| | | emailSendService.sendEmail(target, MessageFormat.format(send_code_text, new Object[] { code }), content); |
| | | //emailSendService.sendEmail(target, content, MessageFormat.format(send_code_text, new Object[] { code })); |
| | | // 调用示例 |
| | | Map<String, Object> model = new HashMap<>(); |
| | | model.put("code", code); |
| | | emailSendService.sendEmail(target, content, "verification_email.ftl", model); |
| | | logger.info(MessageFormat.format("email--target:{0},code:{1},ip:{2}", target, code, ip)); |
| | | } |
| | | |