优化停止充电推送

This commit is contained in:
ZZ 2021-11-22 13:54:05 +08:00
parent 3a186cb915
commit 3d5d0a8bd1
4 changed files with 4 additions and 4 deletions

View File

@ -136,7 +136,7 @@ public class QueryStopChargeController {
//设置推送停止充电订单所需要的数据
Map<String, Object> pushOrder = REDIS.getCacheMap("pushOrder:".concat(xhOrderNo));
pushOrder.put("stopCommandSent", true);
pushOrder.put("stopCommandSent", false);
pushOrder.put("operatorId3rdpty", startChargeSeq.substring(0, 9));
pushOrder.put("internetSerialNumber", startChargeSeq);
REDIS.setCacheMap("pushOrder:".concat(xhOrderNo), pushOrder);

View File

@ -47,7 +47,7 @@ public class CheckChargeOrders extends CoreDispatcher {
for (String pushOrderKey : pushOrders) {
Map<String, Object> pushOrder = REDIS.getCacheMap(pushOrderKey);
Boolean stopCommandSent = (Boolean) pushOrder.get("stopCommandSent");
if (stopCommandSent == null) {
if (stopCommandSent == null || !stopCommandSent) {
continue;
}
String orderNo = pushOrderKey.substring(10);

View File

@ -53,7 +53,7 @@ public class NotificationChargeOrderInfo extends CoreDispatcher {
for (String pushOrderKey : pushOrders) {
Map<String, Object> pushOrder = REDIS.getCacheMap(pushOrderKey);
Boolean stopCommandSent = (Boolean) pushOrder.get("stopCommandSent");
if (stopCommandSent == null) {
if (stopCommandSent == null || !stopCommandSent) {
continue;
}
String orderNo = pushOrderKey.substring(10);

View File

@ -80,7 +80,7 @@ public class NotificationStopChargeResultTask extends CoreDispatcher {
//推送成功则排除这个已推送的订单否则则继续推送该订单
//将stopCommandSent置为null表示推送成功之后该订单都不进行推送
if (succStat == 0) {
pushOrder.replace("stopCommandSent", null);
pushOrder.replace("stopCommandSent", true);
REDIS.setCacheMap(pushOrderKey, pushOrder);
}
}