From 06bbe3fe01e5af9486c309693a975077df813f7c Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期四, 29 九月 2022 16:27:59 +0800 Subject: [PATCH] 添加第二种语音对讲实现 --- src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java | 6 ++++-- 1 files changed, 4 insertions(+), 2 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 d024550..22d195e 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 @@ -73,7 +73,9 @@ result = platformChannelMapper.addChannels(platformId, channelReducesToAdd); // TODO 鍚庣画缁欏钩鍙板鍔犳帶鍒跺紑鍏充互鎺у埗鏄惁鍝嶅簲鐩綍璁㈤槄 List<DeviceChannel> deviceChannelList = getDeviceChannelListByChannelReduceList(channelReducesToAdd, catalogId, platform); - eventPublisher.catalogEventPublish(platformId, deviceChannelList, CatalogEvent.ADD); + if (deviceChannelList != null) { + eventPublisher.catalogEventPublish(platformId, deviceChannelList, CatalogEvent.ADD); + } } return result; @@ -83,7 +85,7 @@ List<DeviceChannel> deviceChannelList = new ArrayList<>(); if (channelReduces.size() > 0){ PlatformCatalog catalog = catalogManager.select(catalogId); - if (catalog == null && !catalogId.equals(platform.getServerGBId())) { + if (catalog == null && !catalogId.equals(platform.getDeviceGBId())) { logger.warn("鏈煡璇㈠埌鐩綍{}鐨勪俊鎭�", catalogId); return null; } -- Gitblit v1.8.0