648540858
2023-06-20 21a96ad20fd75e55d03c00af8df8adb039f0c77a
src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java
@@ -140,15 +140,21 @@
         if (allChannelMap.containsKey(deviceChannel.getChannelId())) {
            deviceChannel.setStreamId(allChannelMap.get(deviceChannel.getChannelId()).getStreamId());
            deviceChannel.setHasAudio(allChannelMap.get(deviceChannel.getChannelId()).isHasAudio());
            if (allChannelMap.get(deviceChannel.getChannelId()).getStatus() !=deviceChannel.getStatus()){
            if (allChannelMap.get(deviceChannel.getChannelId()).isStatus() !=deviceChannel.isStatus()){
               List<String> strings = platformChannelMapper.queryParentPlatformByChannelId(deviceChannel.getChannelId());
               if (!CollectionUtils.isEmpty(strings)){
                  strings.forEach(platformId->{
                     eventPublisher.catalogEventPublish(platformId, deviceChannel, deviceChannel.getStatus()==1?CatalogEvent.ON:CatalogEvent.OFF);
                     eventPublisher.catalogEventPublish(platformId, deviceChannel, deviceChannel.isStatus()?CatalogEvent.ON:CatalogEvent.OFF);
                  });
               }
            }
            deviceChannel.setUpdateTime(DateUtil.getNow());
            updateChannels.add(deviceChannel);
         }else {
            deviceChannel.setCreateTime(DateUtil.getNow());
            deviceChannel.setUpdateTime(DateUtil.getNow());
            addChannels.add(deviceChannel);
         }
         channels.add(deviceChannel);
         if (!ObjectUtils.isEmpty(deviceChannel.getParentId())) {