优化停止充电推送
This commit is contained in:
parent
3a186cb915
commit
3d5d0a8bd1
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user