From e0512f4557edddc953f3f99e05cf8b16d19d2fbb Mon Sep 17 00:00:00 2001 From: ZZ Date: Fri, 13 Aug 2021 13:24:42 +0800 Subject: [PATCH] =?UTF-8?q?!important!=E5=A2=9E=E5=8A=A0=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E9=80=BB=E8=BE=91,=E4=B8=8D=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E5=8F=91=E5=B8=83=E5=88=B0=E7=94=9F=E4=BA=A7=E7=8E=AF?= =?UTF-8?q?=E5=A2=83!important!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/xhpc/pp/controller/ChargingController.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/controller/ChargingController.java b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/controller/ChargingController.java index 5358729c..57f4056d 100644 --- a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/controller/ChargingController.java +++ b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/controller/ChargingController.java @@ -211,7 +211,12 @@ public class ChargingController { cacheOrder.put("tel", startChargingData.getTel()); REDIS.setCacheMap(orderkey, cacheOrder); Map cacheGun = REDIS.getCacheMap(gunkey); + String orderkeyOld = (String) cacheGun.get("orderkey"); + if (orderkeyOld != null) { // todo 测试代码,生成发布时删除 + REDIS.deleteObject(orderkeyOld); + } cacheGun.put("orderkey", orderkey); + REDIS.setCacheMap(gunkey, cacheOrder); return R.ok("订单启动指令已下发至充电桩"); } catch (IOException e) { log.error("send message failed. " + e.getMessage(), e);