Merge remote-tracking branch 'origin/develop_risk' into develop_risk

# Conflicts:
#	src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/RiskBusinessService.java
#	src/main/java/au/com/royalpay/payment/manage/riskbusiness/web/RiskBusinessController.java
master
hellolujian 6 years ago
commit e4a9ed5e3f

@ -71,6 +71,12 @@ public interface RiskBusinessService {
*/
void sendRefuseEmail(String riskId) throws IOException;
/**
*
* @param riskId
*/
void sendUrgeEmail(String riskId) throws IOException;
/**
*

@ -221,6 +221,25 @@ public class RiskBusinessServiceImpl implements RiskBusinessService {
});
}
@Override
public void sendUrgeEmail(String riskId) throws IOException {
JSONObject event = getRiskEventDetail(riskId);
Context ctx = getMailContext(event);
final List<String> emailsTos = (List<String>)ctx.getVariable("emailsTos");
final List<String> emailsCcs = ctx.getVariable("emailsCcs")==null?new ArrayList<>():(List<String>)ctx.getVariable("emailsCcs");
final String content = thymeleaf.process("mail/risk_urge_mail.html", ctx);
royalThreadPoolExecutor.execute(() -> {
try {
String emailId = mailService.sendRiskEmail("Please submit risk materials as soon as possible", emailsTos.isEmpty() ? "" : StringUtils.join(emailsTos, ","),
emailsCcs.isEmpty() ? "" : StringUtils.join(emailsCcs, ","), content, event.getIntValue("order_type")==3?(List<JSONObject>)ctx.getVariable("files"):null,event.getIntValue("order_type"));
event.put("email_status",3);
riskEventMapper.update(event);
} catch (Exception e) {
throw new EmailException("Email Sending Failed", e);
}
});
}
private Context getMailContext(JSONObject event) throws IOException {
JSONObject client = clientMapper.findClientByMonikerAll(event.getString("client_moniker"));
if (client == null) {

@ -114,5 +114,9 @@ public class RiskBusinessController {
riskBusinessService.updateRiskEvent(params);
}
@RequestMapping(value = "/{risk_id}/urge",method = RequestMethod.PUT)
public void urgeEmail(@PathVariable String risk_id) throws IOException {
riskBusinessService.sendUrgeEmail(risk_id);
}
}

@ -0,0 +1,25 @@
<html xmlns:th="http://www.thymeleaf.org" lang="zh">
<b>Dear RoyalPay Merchant/BD :</b>
<p>您好,您的风控材料链接即将过期,请及时提交风控材料。未能按时提交完整证明材料,支付渠道将被关停,请您务必配合调查。感谢。</p>
<p>Your link to the risk materials is about to expire, please submit the risk materials in time.If you can not provide qualified materials on time, the payment channels would be suspended or restricted with amount limit. Please be sure to assist the investigation. Thanks.</p>
<h4>Best Regards</h4>
<p>
<img style="width: 120px;height: 120px"
src="https://mpay.royalpay.com.au/static/images/logo_new.jpg"> <br>
Contact Us<br>
Email:<br>
<a href="mailto:info@royalpay.com.au">info@royalpay.com.au</a> <br>
Tel:<br>
1300 10 77 50<br>
<br>
Service WeChat Account:<br>
<img src="https://mpay.royalpay.com.au/static/images/customer_service.jpg"
style="width: 60px"><br>
Level 14, 383 Kent Street, Sydney NSW 2000<br>
<br>
Level 11, 15 William Street, Melbourne VIC 3000
</p>
<p>Tunnel Show Pty Ltd trading as RoyalPay<br>
Representative of AFSL licensee 448066
</p>
</html>
Loading…
Cancel
Save