diff --git a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/server/ChargingPileBinaryHandler.java b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/server/ChargingPileBinaryHandler.java index a673b72c..1c7f7dfa 100644 --- a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/server/ChargingPileBinaryHandler.java +++ b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/server/ChargingPileBinaryHandler.java @@ -103,9 +103,9 @@ public class ChargingPileBinaryHandler implements ClientBinaryHandler { String resultCode = result.getCode(); String pilekey = "pile:".concat(pileNo); Map cachePile = REDIS.getCacheMap(pilekey); + String tcfgkey = "pile:".concat(pileNo).concat(".tcfg"); if (SERVICE_REGISTER.equals(serviceName) && OK.equals(resultCode)) { - cachePile.put("tcfg", false); - REDIS.setCacheMap(pilekey, cachePile); + REDIS.setCacheObject(tcfgkey, false); regHandler(handler, pileNo, req); } else if (SERVICE_RMR.equals(serviceName) && OK.equals(resultCode)) { setCachePileRM(pilekey); @@ -133,7 +133,6 @@ public class ChargingPileBinaryHandler implements ClientBinaryHandler { if (SERVICE_HB.equals(serviceName)) { if (OK.equals(resultCode)) { pileNo = ChargingPileServer.getPileNo(handler); - String tcfgkey = "pile:".concat(pileNo).concat(".tcfg"); Boolean tcfg = REDIS.getCacheObject(tcfgkey); if (tcfg == null || !tcfg) { String skey = pilekey.concat(".seqhex");