From dc8869be4972b35e4f5a045cb5408ae01f2aad14 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Wed, 13 Mar 2024 15:40:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=94=B6=E5=88=B0redis?= =?UTF-8?q?=E6=8E=A8=E5=8A=A8=E7=9A=84=E6=8E=A8=E6=B5=81=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=9B=B4=E6=96=B0=E5=86=85=E5=AE=B9=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../redisMsg/RedisPushStreamStatusListMsgListener.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisPushStreamStatusListMsgListener.java b/src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisPushStreamStatusListMsgListener.java index 24a19f3e..65239c8f 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisPushStreamStatusListMsgListener.java +++ b/src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisPushStreamStatusListMsgListener.java @@ -75,7 +75,7 @@ public class RedisPushStreamStatusListMsgListener implements MessageListener { if (!contains) { if (allGBId.containsKey(streamPushItem.getGbId())) { GbStream gbStream = allGBId.get(streamPushItem.getGbId()); - logger.warn("[REDIS消息-推流设备列表更新] 国标编号重复: {}, 已分配给{}/{}", + logger.warn("[REDIS消息-推流设备列表更新-INSERT] 国标编号重复: {}, 已分配给{}/{}", streamPushItem.getGbId(), gbStream.getApp(), gbStream.getStream()); continue; } @@ -88,6 +88,12 @@ public class RedisPushStreamStatusListMsgListener implements MessageListener { streamPushItemForSave.add(streamPushItem); allGBId.put(streamPushItem.getGbId(), streamPushItem); } else { + if (allGBId.containsKey(streamPushItem.getGbId())) { + GbStream gbStream = allGBId.get(streamPushItem.getGbId()); + logger.warn("[REDIS消息-推流设备列表更新-UPDATE] 国标编号重复: {}, 已分配给{}/{}", + streamPushItem.getGbId(), gbStream.getApp(), gbStream.getStream()); + continue; + } //存在就只修改 name和gbId streamPushItemForUpdate.add(streamPushItem); }