From 21e66ab399b10b0505ab776b09ae93a5158e07ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E4=BF=8A=E6=9D=B0?= <502612493@qq.com> Date: Tue, 29 Mar 2022 17:31:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?2=E4=B8=AA=E5=B0=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1、add update事件调用错误函数 2、在线的还发在线事件,如果别人正在给你推送目录就会不停的update设备表,设备表又没加锁,页面就无法更改设备信息了。。。 --- .../vmp/gb28181/event/subscribe/catalog/CatalogEventLister.java | 2 +- .../transmit/event/request/impl/NotifyRequestProcessor.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/subscribe/catalog/CatalogEventLister.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/subscribe/catalog/CatalogEventLister.java index 50957f6d..0202fc9d 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/subscribe/catalog/CatalogEventLister.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/subscribe/catalog/CatalogEventLister.java @@ -165,7 +165,7 @@ public class CatalogEventLister implements ApplicationListener { GbStream gbStream = storager.queryStreamInParentPlatform(platform.getServerGBId(), gbId); DeviceChannel deviceChannelByStream = gbStreamService.getDeviceChannelListByStream(gbStream, gbStream.getCatalogId(), platform.getDeviceGBId()); deviceChannelList.add(deviceChannelByStream); - sipCommanderFroPlatform.sendNotifyForCatalogOther(event.getType(), platform, deviceChannelList, subscribeInfo, null); + sipCommanderFroPlatform.sendNotifyForCatalogAddOrUpdate(event.getType(), platform, deviceChannelList, subscribeInfo, null); } } } diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java index 3961eeab..25e43c53 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java @@ -309,7 +309,7 @@ public class NotifyRequestProcessor extends SIPRequestProcessorParent implements } - if (offLineDetector.isOnline(deviceId)) { + if (!offLineDetector.isOnline(deviceId)) { publisher.onlineEventPublish(device, VideoManagerConstants.EVENT_ONLINE_MESSAGE); } } From fff11e4355c99b3a6d73f3d49e595874d9ffd0be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E4=BF=8A=E6=9D=B0?= <502612493@qq.com> Date: Thu, 31 Mar 2022 09:19:45 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=AE=A2=E9=98=85=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=92=8C=E7=A9=BA=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../event/subscribe/catalog/CatalogEventLister.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/subscribe/catalog/CatalogEventLister.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/subscribe/catalog/CatalogEventLister.java index 0202fc9d..20a325b6 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/subscribe/catalog/CatalogEventLister.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/subscribe/catalog/CatalogEventLister.java @@ -156,15 +156,17 @@ public class CatalogEventLister implements ApplicationListener { List parentPlatforms = parentPlatformMap.get(gbId); if (parentPlatforms != null && parentPlatforms.size() > 0) { for (ParentPlatform platform : parentPlatforms) { - SubscribeInfo subscribeInfo = subscribeHolder.getCatalogSubscribe(event.getPlatformId()); + SubscribeInfo subscribeInfo = subscribeHolder.getCatalogSubscribe(platform.getServerGBId()); if (subscribeInfo == null) continue; logger.info("[Catalog事件: {}]平台:{},影响通道{}", event.getType(), platform.getServerGBId(), gbId); List deviceChannelList = new ArrayList<>(); DeviceChannel deviceChannel = storager.queryChannelInParentPlatform(platform.getServerGBId(), gbId); deviceChannelList.add(deviceChannel); GbStream gbStream = storager.queryStreamInParentPlatform(platform.getServerGBId(), gbId); - DeviceChannel deviceChannelByStream = gbStreamService.getDeviceChannelListByStream(gbStream, gbStream.getCatalogId(), platform.getDeviceGBId()); - deviceChannelList.add(deviceChannelByStream); + if(gbStream != null){ + DeviceChannel deviceChannelByStream = gbStreamService.getDeviceChannelListByStream(gbStream, gbStream.getCatalogId(), platform.getDeviceGBId()); + deviceChannelList.add(deviceChannelByStream); + } sipCommanderFroPlatform.sendNotifyForCatalogAddOrUpdate(event.getType(), platform, deviceChannelList, subscribeInfo, null); } }