|
|
|
@ -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 {
|
|
|
|
|