hexq
2024-01-20 dd4e0d0d9c75b5216b08644bfe1333a79f794b58
src/main/java/com/genersoft/iot/vmp/service/impl/GbStreamServiceImpl.java
@@ -77,8 +77,6 @@
        }
        try {
            List<DeviceChannel> deviceChannelList = new ArrayList<>();
            for (int i = 0; i < gbStreams.size(); i++) {
                GbStream gbStream = gbStreams.get(i);
                gbStream.setCatalogId(catalogId);
@@ -251,18 +249,17 @@
            return ;
        }
        if (ObjectUtils.isEmpty(catalogId)) {
            catalogId = platform.getDeviceGBId();
            catalogId = null;
        }
        if (platformGbStreamMapper.delByPlatformAndCatalogId(platformId, catalogId) > 0) {
            List<GbStream> gbStreams = platformGbStreamMapper.queryChannelInParentPlatformAndCatalog(platformId, catalogId);
            List<DeviceChannel> deviceChannelList = new ArrayList<>();
            for (GbStream gbStream : gbStreams) {
                DeviceChannel deviceChannel = new DeviceChannel();
                deviceChannel.setChannelId(gbStream.getGbId());
                deviceChannelList.add(deviceChannel);
            }
            eventPublisher.catalogEventPublish(platformId, deviceChannelList, CatalogEvent.DEL);
        List<GbStream> gbStreams = platformGbStreamMapper.queryChannelInParentPlatformAndCatalog(platformId, catalogId);
        List<DeviceChannel> deviceChannelList = new ArrayList<>();
        for (GbStream gbStream : gbStreams) {
            DeviceChannel deviceChannel = new DeviceChannel();
            deviceChannel.setChannelId(gbStream.getGbId());
            deviceChannelList.add(deviceChannel);
        }
        eventPublisher.catalogEventPublish(platformId, deviceChannelList, CatalogEvent.DEL);
        platformGbStreamMapper.delByPlatformAndCatalogId(platformId, catalogId);
    }
    @Override