diff --git a/src/main/java/com/genersoft/iot/vmp/streamProxy/service/impl/StreamProxyServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/streamProxy/service/impl/StreamProxyServiceImpl.java index 442fb6a6..a657d508 100755 --- a/src/main/java/com/genersoft/iot/vmp/streamProxy/service/impl/StreamProxyServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/streamProxy/service/impl/StreamProxyServiceImpl.java @@ -387,11 +387,14 @@ public class StreamProxyServiceImpl implements IStreamProxyService { streamProxiesForSendMessage.add(streamProxy); } } - // 移除开启了无人观看自动移除的流 - streamProxyMapper.deleteByList(streamProxiesForRemove); - // 修改国标关联的国标通道的状态 - gbChannelService.offline(channelListForOffline); - + if (!streamProxiesForRemove.isEmpty()) { + // 移除开启了无人观看自动移除的流 + streamProxyMapper.deleteByList(streamProxiesForRemove); + } + if (!streamProxiesForRemove.isEmpty()) { + // 修改国标关联的国标通道的状态 + gbChannelService.offline(channelListForOffline); + } if (!streamProxiesForSendMessage.isEmpty()) { for (StreamProxy streamProxy : streamProxiesForSendMessage) { JSONObject jsonObject = new JSONObject();