|
|
|
@ -3,6 +3,7 @@ package au.com.royalpay.payment.manage.riskbusiness.core.impl;
|
|
|
|
|
import au.com.royalpay.payment.core.exceptions.EmailException;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.riskbusiness.RiskEventMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.riskbusiness.RiskMaterialMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.notice.core.MailService;
|
|
|
|
|
import au.com.royalpay.payment.manage.riskbusiness.core.RiskBusinessService;
|
|
|
|
|
import au.com.royalpay.payment.manage.riskbusiness.core.RiskUploadService;
|
|
|
|
@ -28,6 +29,8 @@ public class RiskUploadServiceIpml implements RiskUploadService {
|
|
|
|
|
@Resource
|
|
|
|
|
private RiskEventMapper riskEventMapper;
|
|
|
|
|
@Resource
|
|
|
|
|
private ClientMapper clientMapper;
|
|
|
|
|
@Resource
|
|
|
|
|
private StringRedisTemplate stringRedisTemplate;
|
|
|
|
|
@Resource
|
|
|
|
|
private MailService mailService;
|
|
|
|
@ -45,9 +48,10 @@ public class RiskUploadServiceIpml implements RiskUploadService {
|
|
|
|
|
riskEventMapper.update(event);
|
|
|
|
|
JSONObject operator = riskMaterialMapper.findOperatorById(material.getString("risk_id"));
|
|
|
|
|
if(operator.containsKey("email")){
|
|
|
|
|
JSONObject client = clientMapper.findClientByMoniker(event.getString("client_moniker"));
|
|
|
|
|
Context ctx = new Context();
|
|
|
|
|
ctx.setVariable("client_moniker", event.getString("client_moniker"));
|
|
|
|
|
ctx.setVariable("short_name", event.getString("short_name"));
|
|
|
|
|
ctx.setVariable("short_name", client.getString("short_name"));
|
|
|
|
|
ctx.setVariable("create_time", DateFormatUtils.format(event.getDate("create_time"),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
ctx.setVariable("operator", operator.getString("display_name"));
|
|
|
|
|
final String content = thymeleaf.process("mail/risk_operator_notice", ctx);
|
|
|
|
|