优化级联选择通道页面添加方式
This commit is contained in:
@@ -92,7 +92,7 @@ public class CatalogEventLister implements ApplicationListener<CatalogEvent> {
|
||||
if (event.getDeviceChannels() != null) {
|
||||
deviceChannelList.addAll(event.getDeviceChannels());
|
||||
}
|
||||
if (event.getGbStreams().size() > 0){
|
||||
if (event.getGbStreams() != null && event.getGbStreams().size() > 0){
|
||||
for (GbStream gbStream : event.getGbStreams()) {
|
||||
DeviceChannel deviceChannelByStream = gbStreamService.getDeviceChannelListByStream(gbStream, gbStream.getCatalogId(), parentPlatform.getDeviceGBId());
|
||||
deviceChannelList.add(deviceChannelByStream);
|
||||
@@ -131,7 +131,7 @@ public class CatalogEventLister implements ApplicationListener<CatalogEvent> {
|
||||
if (event.getDeviceChannels() != null) {
|
||||
deviceChannelList.addAll(event.getDeviceChannels());
|
||||
}
|
||||
if (event.getGbStreams().size() > 0){
|
||||
if (event.getGbStreams() != null && event.getGbStreams().size() > 0){
|
||||
for (GbStream gbStream : event.getGbStreams()) {
|
||||
DeviceChannel deviceChannelByStream = gbStreamService.getDeviceChannelListByStream(gbStream, gbStream.getCatalogId(), parentPlatform.getDeviceGBId());
|
||||
deviceChannelList.add(deviceChannelByStream);
|
||||
|
||||
@@ -466,4 +466,8 @@ public interface IVideoManagerStorager {
|
||||
List<ParentPlatform> queryPlatFormListForStreamWithGBId(String app, String stream, List<String> platforms);
|
||||
|
||||
GbStream getGbStream(String app, String streamId);
|
||||
|
||||
void delCatalogByPlatformId(String serverGBId);
|
||||
|
||||
void delRelationByPlatformId(String serverGBId);
|
||||
}
|
||||
|
||||
@@ -88,4 +88,9 @@ public interface PlatformChannelMapper {
|
||||
"<foreach collection='platforms' item='item' open='(' separator=',' close=')' > #{item}</foreach>" +
|
||||
"</script> ")
|
||||
List<ParentPlatform> queryPlatFormListForGBWithGBId(String channelId, List<String> platforms);
|
||||
|
||||
@Delete("<script> " +
|
||||
"DELETE FROM platform_gb_channel WHERE platformId=#{serverGBId}" +
|
||||
"</script>")
|
||||
void delByPlatformId(String serverGBId);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public interface PlatformGbStreamMapper {
|
||||
"from gb_stream gs\n" +
|
||||
" left join platform_gb_stream pgs\n" +
|
||||
" on gs.app = pgs.app and gs.stream = pgs.stream\n" +
|
||||
"where and pgs.platformId=#{platformId} and pgs.catalogId=#{catalogId}")
|
||||
"where pgs.platformId=#{platformId} and pgs.catalogId=#{catalogId}")
|
||||
List<PlatformCatalog> queryChannelInParentPlatformAndCatalogForCatalog(String platformId, String catalogId);
|
||||
|
||||
@Delete("DELETE FROM platform_gb_stream WHERE catalogId=#{id}")
|
||||
|
||||
@@ -1044,4 +1044,15 @@ public class VideoManagerStoragerImpl implements IVideoManagerStorager {
|
||||
public GbStream getGbStream(String app, String streamId) {
|
||||
return gbStreamMapper.selectOne(app, streamId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delCatalogByPlatformId(String serverGBId) {
|
||||
catalogMapper.delByPlatformId(serverGBId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delRelationByPlatformId(String serverGBId) {
|
||||
platformGbStreamMapper.delByPlatformId(serverGBId);
|
||||
platformChannelMapper.delByPlatformId(serverGBId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,6 +172,8 @@ public class PlatformController {
|
||||
}));
|
||||
|
||||
boolean deleteResult = storager.deleteParentPlatform(parentPlatform);
|
||||
storager.delCatalogByPlatformId(parentPlatform.getServerGBId());
|
||||
storager.delRelationByPlatformId(parentPlatform.getServerGBId());
|
||||
|
||||
|
||||
if (deleteResult) {
|
||||
|
||||
Reference in New Issue
Block a user