订单实时数据逻辑
This commit is contained in:
parent
dd213549de
commit
8455982258
@ -117,6 +117,12 @@ public class RealtimeDataLogic implements ServiceLogic {
|
||||
REDIS.setCacheMap(orderkey, cacheOrder);
|
||||
}
|
||||
}
|
||||
if ("true".equals(cacheOrder.get("lordiss"))) {
|
||||
cacheOrder.put("lordiss", "false");
|
||||
pileOrderService.pileStop(orderNo, 4, "订单实时数据恢复");
|
||||
REDIS.setCacheMap(orderkey, cacheOrder);
|
||||
}
|
||||
REDIS.setCacheMap(orderkey, cacheOrder);
|
||||
}
|
||||
return new ServiceResult(false);
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.xhpc.pp.server;
|
||||
|
||||
import com.xhpc.common.api.PileOrderService;
|
||||
import com.xhpc.common.redis.service.RedisService;
|
||||
import com.xhpc.pp.logic.FieldLogic;
|
||||
import com.xhpc.pp.utils.security.HexUtils;
|
||||
@ -43,6 +44,8 @@ public class ChargingPileServer {
|
||||
private FieldLogic fieldLogic;
|
||||
@Autowired
|
||||
public RedisService redisService;
|
||||
@Autowired
|
||||
private static PileOrderService pileOrderService;
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
@ -97,6 +100,14 @@ public class ChargingPileServer {
|
||||
if (!cacheGun.isEmpty()) {
|
||||
cacheGun.put("status", DISCONNECTED);
|
||||
REDIS.setCacheMap(gunkey, cacheGun);
|
||||
String orderkey = (String) cacheGun.get("orderkey");
|
||||
if (orderkey != null) {
|
||||
Map<String, Object> cacheOrder = REDIS.getCacheMap(orderkey);
|
||||
cacheOrder.put("lordiss", "true");
|
||||
REDIS.setCacheMap(orderkey, cacheOrder);
|
||||
String orderNo = orderkey.replace("order:", "");
|
||||
pileOrderService.pileStop(orderNo, 3, "充电桩离线,订单实时数据可能中断");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (handler != null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user