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

master
luoyang 5 years ago
parent bd09d7ebb9
commit 1365bd6424

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

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

Loading…
Cancel
Save