From dd4e0d0d9c75b5216b08644bfe1333a79f794b58 Mon Sep 17 00:00:00 2001 From: hexq <hexiaoqu@visioninsight.com> Date: 星期六, 20 一月 2024 10:22:34 +0800 Subject: [PATCH] BUGFIX:向下级目录关联通道时,出现“未查询到目录xxx的信息" --- src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java index 517cb04..b423a3f 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java @@ -82,7 +82,7 @@ int allCount = 0; boolean result = false; TransactionStatus transactionStatus = dataSourceTransactionManager.getTransaction(transactionDefinition); - int limitCount = 300; + int limitCount = 50; if (channelReducesToAdd.size() > 0) { if (channelReducesToAdd.size() > limitCount) { for (int i = 0; i < channelReducesToAdd.size(); i += limitCount) { @@ -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); } } -- Gitblit v1.8.0