From 92d04c76f9011de2393733bede82453d310e8fbb Mon Sep 17 00:00:00 2001 From: ZZ Date: Thu, 18 Nov 2021 13:50:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E4=BD=99=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xhpc/evcs/api/QueryEquipAuthController.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/evcs-modules/evcs-core/src/main/java/com/xhpc/evcs/api/QueryEquipAuthController.java b/evcs-modules/evcs-core/src/main/java/com/xhpc/evcs/api/QueryEquipAuthController.java index 2bf98693..0f65585d 100644 --- a/evcs-modules/evcs-core/src/main/java/com/xhpc/evcs/api/QueryEquipAuthController.java +++ b/evcs-modules/evcs-core/src/main/java/com/xhpc/evcs/api/QueryEquipAuthController.java @@ -59,16 +59,15 @@ public class QueryEquipAuthController { Long internetUserId = xhpcInternetUserList.get(0).getId(); XhpcStationInternetBlacklist xhpcStationInternetBlacklist = xhpcStationInternetBlacklistRepo.findByChargingStationIdAndInternetUserId(stationId, internetUserId).orElse(null); - resp.setRet("0"); //todo del if (null != xhpcStationInternetBlacklist) { equipAuthResponse.setSuccStat(1); equipAuthResponse.setFailReason(2); resp.setRet("500"); resp.setMsg("auth denied"); } else { - Map realTimeTerminalData = REDIS.getCacheMap("gun:".concat(connectorId)); - String terminalStatus = (String) realTimeTerminalData.get("vehicleGunStatus"); - String status = (String) realTimeTerminalData.get("status"); + Map cacheGun = REDIS.getCacheMap("gun:".concat(connectorId)); + String terminalStatus = (String) cacheGun.get("vehicleGunStatus"); + String status = (String) cacheGun.get("status"); if (!"空闲".equals(status)) { resp.setMsg("终端状态异常:[".concat(status == null ? "未注册" : status).concat("]")); resp.setRet("500");