hexq
2024-01-20 dd4e0d0d9c75b5216b08644bfe1333a79f794b58
src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java
@@ -134,7 +134,7 @@
                    deviceChannelList.add(deviceChannel);
                }
                return deviceChannelList;
            } else if (catalog == null || !catalogId.equals(platform.getDeviceGBId())) {
            } else if (catalog == null && !catalogId.equals(platform.getDeviceGBId())) {
                logger.warn("未查询到目录{}的信息", catalogId);
                return null;
            }
@@ -162,13 +162,12 @@
            return 0;
        }
        if (ObjectUtils.isEmpty(catalogId)) {
           catalogId = platform.getDeviceGBId();
            catalogId = null;
        }
        if ((result = platformChannelMapper.delChannelForGBByCatalogId(platformId, catalogId)) > 0) {
            List<DeviceChannel> deviceChannels = platformChannelMapper.queryAllChannelInCatalog(platformId, catalogId);
            eventPublisher.catalogEventPublish(platformId, deviceChannels, CatalogEvent.DEL);
        }
        return result;
        List<DeviceChannel> deviceChannels = platformChannelMapper.queryAllChannelInCatalog(platformId, catalogId);
        eventPublisher.catalogEventPublish(platformId, deviceChannels, CatalogEvent.DEL);
        return platformChannelMapper.delChannelForGBByCatalogId(platformId, catalogId);
    }
}