|
|
|
@ -9,6 +9,7 @@ import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientBDMapper;
|
|
|
|
|
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.enums.RiskResultTypeEnum;
|
|
|
|
|
import au.com.royalpay.payment.manage.tradelog.core.TradeLogService;
|
|
|
|
|
import au.com.royalpay.payment.manage.riskbusiness.enums.RiskOrderTypeEnum;
|
|
|
|
|
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
|
|
|
|
@ -113,13 +114,10 @@ public class RiskBusinessServiceImpl implements RiskBusinessService {
|
|
|
|
|
if (StringUtils.isNotBlank(orderIds)) {
|
|
|
|
|
String[] orderIdArray = orderIds.trim().split(",");
|
|
|
|
|
JSONObject query = new JSONObject();
|
|
|
|
|
// 获取每笔订单的信息
|
|
|
|
|
// 获取订单信息
|
|
|
|
|
for (int i = 0; i < orderIdArray.length; i++) {
|
|
|
|
|
query.put("order_id", orderIdArray[i]);
|
|
|
|
|
PageList<JSONObject> logs = orderMapper.listOrders(query, new PageBounds());
|
|
|
|
|
if (logs != null && logs.size() != 0) {
|
|
|
|
|
tradeLogs.add(logs.get(0));
|
|
|
|
|
}
|
|
|
|
|
JSONObject orderInfo = orderMapper.findOrderById(orderIdArray[i]);
|
|
|
|
|
tradeLogs.add(orderInfo);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return tradeLogs;
|
|
|
|
@ -162,7 +160,8 @@ public class RiskBusinessServiceImpl implements RiskBusinessService {
|
|
|
|
|
for (int i = 1; i <= 10; i++) {
|
|
|
|
|
filePath = riskMaterial.getString("file" + i + "_url");
|
|
|
|
|
if (filePath != null) {
|
|
|
|
|
zos.putNextEntry(new ZipEntry(filePath.substring(filePath.lastIndexOf("/"))));
|
|
|
|
|
// 文件名前添加'file' + i是为了防止文件名一样
|
|
|
|
|
zos.putNextEntry(new ZipEntry("file" + i + filePath.substring(filePath.lastIndexOf("/"))));
|
|
|
|
|
InputStream inputStream = new URL(filePath).openConnection().getInputStream();
|
|
|
|
|
byte[] buffer = new byte[1024];
|
|
|
|
|
int result = 0;
|
|
|
|
@ -192,7 +191,11 @@ public class RiskBusinessServiceImpl implements RiskBusinessService {
|
|
|
|
|
String emailId = mailService.sendRiskEmail(title, 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",1);
|
|
|
|
|
event.put("result_type",1);
|
|
|
|
|
event.put("result_type", RiskResultTypeEnum.SEND_EMAIL_TO_BD.getResultType());
|
|
|
|
|
Integer orderType = event.getInteger("order_type");
|
|
|
|
|
if (orderType == RiskOrderTypeEnum.WARNING_ORDER.getOrderType()) {
|
|
|
|
|
event.put("result_type", RiskResultTypeEnum.ALREADY_HANDLED.getResultType());
|
|
|
|
|
}
|
|
|
|
|
riskEventMapper.update(event);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
throw new EmailException("Email Sending Failed", e);
|
|
|
|
@ -213,7 +216,7 @@ public class RiskBusinessServiceImpl implements RiskBusinessService {
|
|
|
|
|
String emailId = mailService.sendRiskEmail("You need to resubmit risk materials", 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",2);
|
|
|
|
|
event.put("result_type",4);
|
|
|
|
|
event.put("result_type",RiskResultTypeEnum.MATERIAL_NOT_PASS.getResultType());
|
|
|
|
|
riskEventMapper.update(event);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
throw new EmailException("Email Sending Failed", e);
|
|
|
|
|