增加推流添加功能,修复级联目录推送

This commit is contained in:
648540858
2022-07-22 16:02:14 +08:00
parent eefe6f4c8d
commit e29d94c83f
12 changed files with 139 additions and 32 deletions

View File

@@ -50,7 +50,7 @@ public interface PlatformCatalogMapper {
@Select("SELECT pc.* FROM platform_catalog pc WHERE pc.id = #{id}")
PlatformCatalog selectParentCatalog(String id);
@Select("SELECT pc.id as channelId, pc.name, pc.civilCode, pc.businessGroupId,'0' as parental, pc.parentId " +
@Select("SELECT pc.id as channelId, pc.name, pc.civilCode, pc.businessGroupId,'1' as parental, pc.parentId " +
" FROM platform_catalog pc WHERE pc.platformId=#{platformId}")
List<DeviceChannel> queryCatalogInPlatform(String platformId);
}

View File

@@ -741,6 +741,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage {
if (platformCatalog.getPlatformId().equals(platformCatalog.getParentId())) {
// 第一层节点
platformCatalog.setBusinessGroupId(platformCatalog.getId());
platformCatalog.setParentId(platform.getDeviceGBId());
}else {
// 获取顶层的
PlatformCatalog topCatalog = getTopCatalog(platformCatalog.getParentId(), platformCatalog.getPlatformId());
@@ -749,6 +750,10 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage {
}
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);