缓存枪状态字段处理逻辑完善
This commit is contained in:
parent
692aa17418
commit
0b2de8b5a4
@ -91,10 +91,10 @@ public class ChargingPileServer {
|
||||
Map<String, Object> cachePile = REDIS.getCacheMap(pkey);
|
||||
cachePile.put("status", DISCONNECTED);
|
||||
REDIS.setCacheMap(pkey, cachePile);
|
||||
for (int i = 1; i < 10; i++) {
|
||||
for (int i = 1; i <= 10; i++) {
|
||||
String gunkey = "gun:".concat(pileNo).concat(String.format("%02d", i));
|
||||
Map<String, Object> cacheGun = REDIS.getCacheMap(gunkey);
|
||||
if (cacheGun != null) {
|
||||
if (cacheGun != null && !cacheGun.isEmpty()) {
|
||||
cacheGun.put("status", DISCONNECTED);
|
||||
REDIS.setCacheMap(gunkey, cacheGun);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user