From e29d94c83f62960bb1d6dacac4c978debc85c5ef Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期五, 22 七月 2022 16:02:14 +0800 Subject: [PATCH] 增加推流添加功能,修复级联目录推送 --- src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java | 37 +++++-------------------------------- 1 files changed, 5 insertions(+), 32 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java index a839f72..8465d80 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java @@ -443,20 +443,6 @@ // 鏇存柊缂撳瓨 parentPlatformCatch.setParentPlatform(parentPlatform); redisCatchStorage.updatePlatformCatchInfo(parentPlatformCatch); - if (parentPlatform.isEnable()) { - // 鍏变韩鎵�鏈夎棰戞祦锛岄渶瑕佸皢鐜版湁瑙嗛娴佹坊鍔犲埌姝ゅ钩鍙� - List<GbStream> gbStreams = gbStreamMapper.queryStreamNotInPlatform(); - if (gbStreams.size() > 0) { - for (GbStream gbStream : gbStreams) { - gbStream.setCatalogId(parentPlatform.getCatalogId()); - } - if (parentPlatform.isShareAllLiveStream()) { - gbStreamService.addPlatformInfo(gbStreams, parentPlatform.getServerGBId(), parentPlatform.getCatalogId()); - }else { - gbStreamService.delPlatformInfo(parentPlatform.getServerGBId(), gbStreams); - } - } - } return result > 0; } @@ -673,24 +659,6 @@ streamPushMapper.del(streamPushItem.getApp(), streamPushItem.getStream()); streamPushMapper.add(streamPushItem); mediaOffline(streamPushItem.getApp(), streamPushItem.getStream()); - - if(!StringUtils.isEmpty(streamPushItem.getGbId() )){ - // 鏌ユ壘寮�鍚簡鍏ㄩ儴鐩存挱娴佸叡浜殑涓婄骇骞冲彴 - List<ParentPlatform> parentPlatforms = parentPlatformMapper.selectAllAhareAllLiveStream(); - if (parentPlatforms.size() > 0) { - for (ParentPlatform parentPlatform : parentPlatforms) { - StreamProxyItem streamProxyItem = platformGbStreamMapper.selectOne(streamPushItem.getApp(), streamPushItem.getStream(), - parentPlatform.getServerGBId()); - if (streamProxyItem == null) { - streamPushItem.setCatalogId(parentPlatform.getCatalogId()); - streamPushItem.setPlatformId(parentPlatform.getServerGBId()); - platformGbStreamMapper.add(streamPushItem); - eventPublisher.catalogEventPublishForStream(parentPlatform.getServerGBId(), streamPushItem, CatalogEvent.ADD); - } - } - } - } - } @Override @@ -773,6 +741,7 @@ if (platformCatalog.getPlatformId().equals(platformCatalog.getParentId())) { // 绗竴灞傝妭鐐� platformCatalog.setBusinessGroupId(platformCatalog.getId()); + platformCatalog.setParentId(platform.getDeviceGBId()); }else { // 鑾峰彇椤跺眰鐨� PlatformCatalog topCatalog = getTopCatalog(platformCatalog.getParentId(), platformCatalog.getPlatformId()); @@ -781,6 +750,10 @@ } if (platform.getTreeType().equals(TreeType.CIVIL_CODE)) { platformCatalog.setCivilCode(platformCatalog.getId()); + if (platformCatalog.getPlatformId().equals(platformCatalog.getParentId())) { + // 绗竴灞傝妭鐐� + platformCatalog.setParentId(platform.getDeviceGBId()); + } } int result = catalogMapper.add(platformCatalog); -- Gitblit v1.8.0