| | |
| | | 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; |
| | |
| | | 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; |
| | | } |