fix 退款占比预警增加风控人员微信推送

master
luoyang 5 years ago
parent c3198044ca
commit ca27ab3cf7

@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>1.0.28</version>
<version>1.0.29</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

@ -93,7 +93,7 @@ public class CloseOrderWarningSender implements ApplicationListener<OrderCloseEv
}
}
warningList.put(moniker, new Date());
List<JSONObject> developers = managerMapper.listDetailsByRole(null, ManagerRole.DEVELOPER.getMask());
List<JSONObject> developers = managerMapper.listDetailsByRole(null, ManagerRole.DEVELOPER.getMask() | ManagerRole.RISK_MANAGER.getMask());
if (!StringUtils.isEmpty(client.getString("bd_user"))) {
String[] bds = client.getString("bd_user").split(",");
if (bds.length > 0) {
@ -133,6 +133,9 @@ public class CloseOrderWarningSender implements ApplicationListener<OrderCloseEv
if (developer.getString("manager_id").equals("141")) {
continue;
}
if (StringUtils.isBlank(developer.getString("wx_openid"))) {
continue;
}
try {
String title = client.getString("short_name") + "(" + moniker + ")";
String content = "最近" + recentOrders.size() + "笔订单中有" + closed.size() + "笔关闭,占比" + percentage + "%;\r\n" + "最早一笔:"
@ -144,7 +147,8 @@ public class CloseOrderWarningSender implements ApplicationListener<OrderCloseEv
"所属BD:" + client.getString("bd_user_name"));
api.sendTemplateMessage(msg);
}
} catch (Exception ignore) {
} catch (Exception e) {
logger.info("sendTemplateMessage--发送告警模板消息发生错误" + developer.getString("wx_openid") + "--" + e);
}
}
}

@ -108,12 +108,15 @@ public class PaymentAmountCheatMonitor implements CheatMonitor {
}
warningList.put(subMerchantId, new Date());
List<JSONObject> developers = managerMapper.listDetailsByRole(null, ManagerRole.DEVELOPER.getMask());
List<JSONObject> developers = managerMapper.listDetailsByRole(null, ManagerRole.DEVELOPER.getMask() | ManagerRole.RISK_MANAGER.getMask());
MpWechatApi api = mpWechatApiProvider.getNewPaymentApi();
for (JSONObject developer : developers) {
if(developer.getString("manager_id").equals("141")){
continue;
}
if (StringUtils.isBlank(developer.getString("wx_openid"))) {
continue;
}
try {
String wxOpenid = developer.getString("wx_openid");
if (wxOpenid != null) {
@ -124,7 +127,8 @@ public class PaymentAmountCheatMonitor implements CheatMonitor {
TemplateMessage msg = WarningSenderHelper.buildWarningMessage(wxOpenid, templateId, title, content, client.getString("bd_user_name"));
api.sendTemplateMessage(msg);
}
} catch (Exception ignore) {
} catch (Exception e) {
logger.info("sendTemplateMessage--发送告警模板消息发生错误" + developer.getString("wx_openid") + "--" + e);
}
}
}

Loading…
Cancel
Save