增加推流添加功能,修复级联目录推送
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user