master
yixian 6 years ago
parent 6b6b26d540
commit e576c675fd

@ -68,9 +68,9 @@ public class CloseOrderWarningSender implements ApplicationListener<OrderCloseEv
params.put("from", fromStr);
params.put("to", toStr);
List<JSONObject> recentOrders = orderMapper.listOrdersNoPage(params);
int minOrders = config.getIntValue("cheat_monitor.min_orders");
int minOrders = config.getIntValue("cheat_monitor.mch_close_warning_min_orders");
if (recentOrders.size() < minOrders) {
logger.debug("order count:" + recentOrders.size() + " is less than min orders, skip");
logger.debug("order count:{} is less than min orders, skip", recentOrders.size());
return;
}
List<JSONObject> closed = new ArrayList<>();
@ -88,13 +88,13 @@ public class CloseOrderWarningSender implements ApplicationListener<OrderCloseEv
if (lastWarning != null) {
long noDisturbingMinutes = config.getLongValue("cheat_monitor.no_disturbing");
if (System.currentTimeMillis() - lastWarning.getTime() < noDisturbingMinutes * 60_000) {
logger.debug("close order warning: no disturbing " + order.getString("order_id"));
logger.debug("close order warning: no disturbing {}", order.getString("order_id"));
return;
}
}
warningList.put(moniker, new Date());
List<JSONObject> developers = managerMapper.listDetailsByRole(null, ManagerRole.DEVELOPER.getMask());
if(!StringUtils.isEmpty(client.getString("bd_user"))){
if (!StringUtils.isEmpty(client.getString("bd_user"))) {
String[] bds = client.getString("bd_user").split(",");
if (bds.length > 0) {
List<Integer> ids = new LinkedList<>();
@ -107,7 +107,6 @@ public class CloseOrderWarningSender implements ApplicationListener<OrderCloseEv
}
MpWechatApi api = mpWechatApiProvider.getNewPaymentApi();
// List<JSONObject> accounts = clientAccountMapper.listAdminAccounts(clientId);
// for (JSONObject account : accounts) {
@ -131,7 +130,7 @@ public class CloseOrderWarningSender implements ApplicationListener<OrderCloseEv
// }
for (JSONObject developer : developers) {
if(developer.getString("manager_id").equals("141")){
if (developer.getString("manager_id").equals("141")) {
continue;
}
try {

@ -304,9 +304,9 @@
<div class="panel-heading">商户关单率预警 <span class="small text-red">检测当日订单触发预警将发送告警消息于开发者商户所属BD</span></span></div>
<div class="panel-body">
<div class="form-group col-sm-6">
<label class="control-label col-sm-5">订单数:</label>
<label class="control-label col-sm-5">订单数:</label>
<div class="col-sm-6">
<input class="form-control" ng-model="paymentconfig['cheat_monitor.min_orders']">
<input class="form-control" ng-model="paymentconfig['cheat_monitor.mch_close_warning_min_orders']">
</div>
</div>
<div class="form-group col-sm-6">

Loading…
Cancel
Save