From f4e5e0396245f249153f76382772d943acc1192a Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期三, 21 六月 2023 15:53:26 +0800
Subject: [PATCH] 修复表名错误 #904
---
src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java | 13 ++++---------
1 files changed, 4 insertions(+), 9 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 7d827d7..eeea29a 100644
--- a/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java
+++ b/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java
@@ -126,22 +126,17 @@
List<DeviceChannel> deviceChannelList = new ArrayList<>();
if (channelReduces.size() > 0){
PlatformCatalog catalog = catalogManager.select(catalogId);
- if (catalog == null && !catalogId.equals(platform.getDeviceGBId())) {
+ if (catalog == null || !catalogId.equals(platform.getDeviceGBId())) {
logger.warn("鏈煡璇㈠埌鐩綍{}鐨勪俊鎭�", catalogId);
return null;
}
for (ChannelReduce channelReduce : channelReduces) {
DeviceChannel deviceChannel = deviceChannelMapper.queryChannel(channelReduce.getDeviceId(), channelReduce.getChannelId());
deviceChannel.setParental(0);
+ deviceChannel.setCivilCode(catalog.getCivilCode());
+ deviceChannel.setParentId(catalog.getParentId());
+ deviceChannel.setBusinessGroupId(catalog.getBusinessGroupId());
deviceChannelList.add(deviceChannel);
- if (platform.getTreeType().equals(TreeType.CIVIL_CODE)){
- deviceChannel.setCivilCode(catalogId);
- }else if (platform.getTreeType().equals(TreeType.BUSINESS_GROUP)){
- deviceChannel.setParentId(catalogId);
- if (catalog != null) {
- deviceChannel.setBusinessGroupId(catalog.getBusinessGroupId());
- }
- }
}
}
return deviceChannelList;
--
Gitblit v1.8.0