|
|
|
@ -17,6 +17,7 @@ import au.com.royalpay.payment.manage.notice.core.MailService;
|
|
|
|
|
import au.com.royalpay.payment.manage.pushMessage.APNSMessageHelper;
|
|
|
|
|
import au.com.royalpay.payment.manage.pushMessage.bean.AppManagerMessageBuilder;
|
|
|
|
|
import au.com.royalpay.payment.manage.riskbusiness.core.RiskBusinessService;
|
|
|
|
|
import au.com.royalpay.payment.manage.riskbusiness.enums.RiskEmailStatusEnum;
|
|
|
|
|
import au.com.royalpay.payment.manage.riskbusiness.enums.RiskResultTypeEnum;
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.beans.TodoNotice;
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.ManagerTodoNoticeProvider;
|
|
|
|
@ -55,6 +56,7 @@ import org.thymeleaf.spring4.SpringTemplateEngine;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import java.io.*;
|
|
|
|
|
import java.net.URL;
|
|
|
|
|
import java.text.ParseException;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.util.concurrent.LinkedBlockingQueue;
|
|
|
|
@ -138,6 +140,31 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PageList<JSONObject> riskEvents = riskEventMapper.listRisksByPage(params, new PageBounds(params.getInteger("page"), 10, Order.formString("create_time.desc")));
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 以下为判断调单事件是否过期
|
|
|
|
|
* 微信调单、支付宝调单、royalpay调单
|
|
|
|
|
* 未处理、已发送、待审核、打回
|
|
|
|
|
*/
|
|
|
|
|
Date currentDate = new Date(), replyDate;
|
|
|
|
|
Integer resultType, orderType;
|
|
|
|
|
boolean isPassTimeout = false;
|
|
|
|
|
for (JSONObject riskEvent : riskEvents) {
|
|
|
|
|
try {
|
|
|
|
|
replyDate = DateUtils.parseDate(riskEvent.getString("reply_email_date"), "yyyy-MM-dd");
|
|
|
|
|
} catch (ParseException e) {
|
|
|
|
|
replyDate = currentDate;
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
resultType = riskEvent.getInteger("result_type");
|
|
|
|
|
orderType = riskEvent.getInteger("order_type");
|
|
|
|
|
isPassTimeout = (currentDate.after(replyDate)) &&
|
|
|
|
|
(!resultType.equals(RiskResultTypeEnum.MATERIAL_AUDIT_PASS.getResultType())) &&
|
|
|
|
|
(!resultType.equals(RiskResultTypeEnum.ALREADY_HANDLED.getResultType())) &&
|
|
|
|
|
(!orderType.equals(RiskOrderTypeEnum.WARNING_ORDER.getOrderType())) &&
|
|
|
|
|
(!orderType.equals(RiskOrderTypeEnum.GENERAL_ORDER.getOrderType()));
|
|
|
|
|
riskEvent.put("pass_timeout", isPassTimeout);
|
|
|
|
|
}
|
|
|
|
|
return PageListUtils.buildPageListResult(riskEvents);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -164,9 +191,7 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
|
|
|
|
|
String realOrderIds = riskEvent.getString("real_order_ids");
|
|
|
|
|
JSONObject client = clientMapper.findClientByMonikerAll(riskEvent.getString("client_moniker"));
|
|
|
|
|
List<JSONObject> tradeLogs = new ArrayList<>();
|
|
|
|
|
/**
|
|
|
|
|
* 通用号调单会有client为空的情况,所以无法查到订单信息
|
|
|
|
|
*/
|
|
|
|
|
// 通用号调单会有client为空的情况,所以无法查到订单信息
|
|
|
|
|
if (client != null && StringUtils.isNotBlank(realOrderIds)) {
|
|
|
|
|
String[] orderIdArray = realOrderIds.trim().split(",");
|
|
|
|
|
JSONObject orderInfo = new JSONObject();
|
|
|
|
@ -299,7 +324,7 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
|
|
|
|
|
try {
|
|
|
|
|
String emailId = mailService.sendRiskEmail(title, emailsTos.isEmpty() ? "" : StringUtils.join(emailsTos, ","),
|
|
|
|
|
emailsCcs.isEmpty() ? "" : StringUtils.join(emailsCcs, ","), "",content, null,event.getIntValue("order_type"));
|
|
|
|
|
event.put("email_status",1);
|
|
|
|
|
event.put("email_status", RiskEmailStatusEnum.ALREADY_SEND.getEmailStatus());
|
|
|
|
|
event.put("result_type", RiskResultTypeEnum.SEND_EMAIL_TO_BD.getResultType());
|
|
|
|
|
event.put("submit_url",uploadUrl);
|
|
|
|
|
Integer orderType = event.getInteger("order_type");
|
|
|
|
|