[fix]风控内部调单添加密送邮箱

master
lujian 6 years ago
parent ebf434c161
commit 2dde2116c7

@ -252,7 +252,10 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
if (client != null && StringUtils.isNotBlank(realOrderIds)) { if (client != null && StringUtils.isNotBlank(realOrderIds)) {
String[] orderIdArray = realOrderIds.trim().split(","); String[] orderIdArray = realOrderIds.trim().split(",");
JSONObject orderInfo = new JSONObject(); JSONObject orderInfo = new JSONObject();
// 获取订单信息 /**
*
*
*/
if (riskEvent.getIntValue("order_type") == 3) { if (riskEvent.getIntValue("order_type") == 3) {
for (int i = 0; i < orderIdArray.length; i++) { for (int i = 0; i < orderIdArray.length; i++) {
orderInfo = tradeLogService.getOrderDetail(new JSONObject(), riskEvent.getString("client_moniker"), orderIdArray[i], null); orderInfo = tradeLogService.getOrderDetail(new JSONObject(), riskEvent.getString("client_moniker"), orderIdArray[i], null);
@ -320,6 +323,14 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
} }
return params; return params;
} }
/**
*
* risk_orders
*
* @param params
* @param manager
*/
@Override @Override
public void addRiskEvent(JSONObject params, JSONObject manager) { public void addRiskEvent(JSONObject params, JSONObject manager) {
params = getEvent(params); params = getEvent(params);
@ -357,6 +368,11 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
setRiskOrders(params); setRiskOrders(params);
} }
/**
*
* @param riskId
* @param response
*/
@Override @Override
public void downloadAuditMaterialZiP(String riskId, HttpServletResponse response) { public void downloadAuditMaterialZiP(String riskId, HttpServletResponse response) {
@ -393,6 +409,14 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
} }
} }
/**
*
*
*
* App
* @param riskId
* @throws IOException
*/
@Override @Override
public void sendUploadEmail(String riskId) throws IOException { public void sendUploadEmail(String riskId) throws IOException {
JSONObject event = getRiskEventDetail(riskId); JSONObject event = getRiskEventDetail(riskId);
@ -433,6 +457,11 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
}); });
} }
/**
* App
* risk
* @param event
*/
private void sendAppRiskMessage(JSONObject event){ private void sendAppRiskMessage(JSONObject event){
JSONObject client = clientMapper.findClientByMoniker(event.getString("client_moniker")); JSONObject client = clientMapper.findClientByMoniker(event.getString("client_moniker"));
logger.debug("sendRiskAppMessage-" + client.getString("client_moniker") + "-" + "risk_id:"+event.getString("risk_id")); logger.debug("sendRiskAppMessage-" + client.getString("client_moniker") + "-" + "risk_id:"+event.getString("risk_id"));
@ -477,6 +506,15 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
} }
} }
/**
*
* @param dev_id
* @param client_id
* @param messageType
* @param dev_token
* @param remark
* @return
*/
private JSONObject saveAppMessageLog(String dev_id, int client_id, String messageType, String dev_token, String remark) { private JSONObject saveAppMessageLog(String dev_id, int client_id, String messageType, String dev_token, String remark) {
JSONObject log = new JSONObject(); JSONObject log = new JSONObject();
log.put("dev_id", dev_id); log.put("dev_id", dev_id);
@ -490,6 +528,15 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
} }
/**
*
*
*
*
* @param riskId
* @param refuseDescription
* @throws IOException
*/
@Transactional @Transactional
@Override @Override
public void sendRefuseEmail(String riskId, String refuseDescription) throws IOException { public void sendRefuseEmail(String riskId, String refuseDescription) throws IOException {
@ -518,7 +565,6 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
event.put("result_type",RiskResultTypeEnum.MATERIAL_NOT_PASS.getResultType()); event.put("result_type",RiskResultTypeEnum.MATERIAL_NOT_PASS.getResultType());
event.put("submit_url",uploadUrl); event.put("submit_url",uploadUrl);
riskEventMapper.update(event); riskEventMapper.update(event);
// 日志记录
riskProcessLogService.addRiskProcessLog(riskId, riskProcessLogService.addRiskProcessLog(riskId,
event.getString("fillin_id"), event.getString("fillin_id"),
event.getString("fillin_person"), event.getString("fillin_person"),
@ -531,6 +577,11 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
}); });
} }
/**
*
* @param riskId
* @throws IOException
*/
@Override @Override
public void sendUrgeEmail(String riskId) throws IOException { public void sendUrgeEmail(String riskId) throws IOException {
JSONObject event = getRiskEventDetail(riskId); JSONObject event = getRiskEventDetail(riskId);
@ -614,16 +665,49 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
List<JSONObject> orders = new ArrayList(); List<JSONObject> orders = new ArrayList();
int isSendClient = event.getIntValue("is_send_client"); int isSendClient = event.getIntValue("is_send_client");
ctx.setVariable("emailsTos", bdEmails); ctx.setVariable("emailsTos", bdEmails);
// 内部调单需要密送的人
List<String> emailsBccs = new ArrayList<>(Arrays.asList(
"locky@royalpay.com.au ", "leo.huang@royalpay.com.au",
"mona.zhang@royalpay.com.au", "weixinfengkong@royalpay.com.au", "thomas.li@royalpay.com.au"
));
/**
*
* bd
* bdemailsBccs
*
*
* "18852852189@163.com"
*
* Arrays.asList("18852852189@139.com", "1370256381@qq.com")debug
*/
if (isSendClient == 1) { if (isSendClient == 1) {
ctx.setVariable("emailsTos", clientEmails); ctx.setVariable("emailsTos", clientEmails);
ctx.setVariable("emailsCcs", bdEmails); ctx.setVariable("emailsCcs", bdEmails);
if (orderType == RiskOrderTypeEnum.ROYALPAY_ORDER.getOrderType().intValue()) { if (orderType == RiskOrderTypeEnum.ROYALPAY_ORDER.getOrderType().intValue()) {
ctx.setVariable("emailsBccs", Arrays.asList( ctx.setVariable("emailsCcs", null);
// "locky@royalpay.com.au ", "zoe.tao@royalpay.com.au", "leo.huang@royalpay.com.au", if (PlatformEnvironment.getEnv().isDebug()) {
// "mona.zhang@royalpay.com.au", "weixinfengkong@royalpay.com.au", "thomas.li@royalpay.com.au" emailsBccs = new ArrayList<>(Arrays.asList(
"18852852189@139.com", "1370256381@qq.com" "18852852189@139.com", "1370256381@qq.com"
)); ));
} }
emailsBccs.addAll(bdEmails);
ctx.setVariable("emailsBccs", emailsBccs);
}
} else {
if (orderType == RiskOrderTypeEnum.ROYALPAY_ORDER.getOrderType().intValue()) {
if (PlatformEnvironment.getEnv().isDebug()) {
emailsBccs = new ArrayList<>(Arrays.asList(
"18852852189@139.com", "1370256381@qq.com"
));
}
emailsBccs.addAll(bdEmails);
ctx.setVariable("emailsBccs", emailsBccs);
ctx.setVariable("emailsTos", Arrays.asList(
"18852852189@163.com"
));
}
} }
switch (event.getIntValue("order_type")){ switch (event.getIntValue("order_type")){
@ -672,6 +756,11 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
return UPLOAD_MAIL_PREFIX + codeKey; return UPLOAD_MAIL_PREFIX + codeKey;
} }
/**
*
* @param param
* @return
*/
@Override @Override
public JSONObject getRiskMaterial(JSONObject param) { public JSONObject getRiskMaterial(JSONObject param) {
List<JSONObject> riskMaterialList = riskMaterialMapper.findAllMaterials(param.getString("risk_id")); List<JSONObject> riskMaterialList = riskMaterialMapper.findAllMaterials(param.getString("risk_id"));
@ -696,6 +785,12 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
return null; return null;
} }
/**
* system_transaction_idorder_id
* real_order_idorder_id,
* real_order_id
* client_idreal_order_id
*/
@Override @Override
@Transactional @Transactional
public void completeEventRealOrderIds() { public void completeEventRealOrderIds() {
@ -847,12 +942,17 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
return ""; return "";
} }
/**
*
* @param manager
* @param notices
*/
@Override @Override
public void checkTodo(JSONObject manager, List<TodoNotice> notices) { public void checkTodo(JSONObject manager, List<TodoNotice> notices) {
/** /**
* 1BD * 1BD
* 2BD * 2BD
* 3 * 3退noticeFlagtrue
*/ */
if (ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) { if (ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) {
JSONObject params = new JSONObject(); JSONObject params = new JSONObject();
@ -889,6 +989,11 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
riskEventMapper.deleteRiskEvent(riskId); riskEventMapper.deleteRiskEvent(riskId);
} }
/**
*
* @param clientId
* @return
*/
@Override @Override
public JSONObject getNoticeInfo(int clientId) { public JSONObject getNoticeInfo(int clientId) {
@ -912,6 +1017,13 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
return result; return result;
} }
/**
*
*
*
* @param riskId
* @return
*/
@Override @Override
public JSONObject getRiskEventMaterialsRemark(String riskId) { public JSONObject getRiskEventMaterialsRemark(String riskId) {
JSONObject riskEvent = riskEventMapper.findById(riskId); JSONObject riskEvent = riskEventMapper.findById(riskId);
@ -1015,6 +1127,9 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
return event; return event;
} }
/**
* risk_orders
*/
@Override @Override
public void completeOrderAmount() { public void completeOrderAmount() {
List<JSONObject> riskEventList = getRiskEvents(null); List<JSONObject> riskEventList = getRiskEvents(null);

Loading…
Cancel
Save