|
@ -153,16 +153,18 @@ public class CatalogEventLister implements ApplicationListener<CatalogEvent> { |
|
|
List<ParentPlatform> parentPlatforms = parentPlatformMap.get(gbId); |
|
|
List<ParentPlatform> parentPlatforms = parentPlatformMap.get(gbId); |
|
|
if (parentPlatforms != null && parentPlatforms.size() > 0) { |
|
|
if (parentPlatforms != null && parentPlatforms.size() > 0) { |
|
|
for (ParentPlatform platform : parentPlatforms) { |
|
|
for (ParentPlatform platform : parentPlatforms) { |
|
|
SubscribeInfo subscribeInfo = subscribeHolder.getCatalogSubscribe(event.getPlatformId()); |
|
|
SubscribeInfo subscribeInfo = subscribeHolder.getCatalogSubscribe(platform.getServerGBId()); |
|
|
if (subscribeInfo == null) continue; |
|
|
if (subscribeInfo == null) continue; |
|
|
logger.info("[Catalog事件: {}]平台:{},影响通道{}", event.getType(), platform.getServerGBId(), gbId); |
|
|
logger.info("[Catalog事件: {}]平台:{},影响通道{}", event.getType(), platform.getServerGBId(), gbId); |
|
|
List<DeviceChannel> deviceChannelList = new ArrayList<>(); |
|
|
List<DeviceChannel> deviceChannelList = new ArrayList<>(); |
|
|
DeviceChannel deviceChannel = storager.queryChannelInParentPlatform(platform.getServerGBId(), gbId); |
|
|
DeviceChannel deviceChannel = storager.queryChannelInParentPlatform(platform.getServerGBId(), gbId); |
|
|
deviceChannelList.add(deviceChannel); |
|
|
deviceChannelList.add(deviceChannel); |
|
|
GbStream gbStream = storager.queryStreamInParentPlatform(platform.getServerGBId(), gbId); |
|
|
GbStream gbStream = storager.queryStreamInParentPlatform(platform.getServerGBId(), gbId); |
|
|
DeviceChannel deviceChannelByStream = gbStreamService.getDeviceChannelListByStream(gbStream, gbStream.getCatalogId(), platform.getDeviceGBId()); |
|
|
if(gbStream != null){ |
|
|
deviceChannelList.add(deviceChannelByStream); |
|
|
DeviceChannel deviceChannelByStream = gbStreamService.getDeviceChannelListByStream(gbStream, gbStream.getCatalogId(), platform.getDeviceGBId()); |
|
|
sipCommanderFroPlatform.sendNotifyForCatalogOther(event.getType(), platform, deviceChannelList, subscribeInfo, null); |
|
|
deviceChannelList.add(deviceChannelByStream); |
|
|
|
|
|
} |
|
|
|
|
|
sipCommanderFroPlatform.sendNotifyForCatalogAddOrUpdate(event.getType(), platform, deviceChannelList, subscribeInfo, null); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|