From 79686e62d2321416a530107f6f97debc35feb5d2 Mon Sep 17 00:00:00 2001 From: ZZ Date: Tue, 31 Aug 2021 19:22:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=AD=E5=BC=80=E8=BF=9E=E6=8E=A5=E4=BD=86?= =?UTF-8?q?=E4=B8=8D=E4=BF=AE=E6=94=B9=E5=85=85=E7=94=B5=E6=A1=A9=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=92=8Chandler=E5=AF=B9=E5=BA=94=E5=85=B3=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xhpc/pp/server/ChargingPileEventHandler.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/server/ChargingPileEventHandler.java b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/server/ChargingPileEventHandler.java index f13c33f9..4a8c994b 100644 --- a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/server/ChargingPileEventHandler.java +++ b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/server/ChargingPileEventHandler.java @@ -7,11 +7,6 @@ import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; -import java.util.Map; - -import static com.xhpc.common.data.redis.StaticBeanUtil.REDIS; -import static com.xhpc.pp.logic.RegisterLogic.DISCONNECTED; - @Lazy(false) @Component public class ChargingPileEventHandler implements ClientEventHandler { @@ -43,11 +38,11 @@ public class ChargingPileEventHandler implements ClientEventHandler { public void closingConnection(ClientHandler handler) { String pileNo = ChargingPileServer.getPileNo(handler); - ChargingPileServer.removeHandler(pileNo); - String pkey = "pile:".concat(pileNo); - Map cachePile = REDIS.getCacheMap(pkey); - cachePile.put("status", DISCONNECTED); - REDIS.setCacheMap(pkey, cachePile); +// ChargingPileServer.removeHandler(pileNo); +// String pkey = "pile:".concat(pileNo); +// Map cachePile = REDIS.getCacheMap(pkey); +// cachePile.put("status", DISCONNECTED); +// REDIS.setCacheMap(pkey, cachePile); handler.closeConnection(); log.info("-> ({}) - [{}] <- {}", pileNo, handler.getName(), handler.getSocket().getRemoteSocketAddress().toString()); }