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