From 76a49215d05daa1ab6c15059b16740ac8b787ffd Mon Sep 17 00:00:00 2001 From: panshuling321 Date: Tue, 19 Jul 2022 09:55:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AF=B9=E6=97=B6=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=9C=A8=E6=B3=A8=E5=86=8C=E6=97=B6=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xhpc/pp/server/ChargingPileBinaryHandler.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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");