TRX 1 rok pred
rodič
commit
d507dea26f

+ 2 - 1
OneCardIotServer/src/main/java/com/zhongshu/iot/server/core/service/iot/IotSendMessageService.java

@@ -77,6 +77,7 @@ public class IotSendMessageService extends SuperService {
         log.info("****************sendIotMessage***************设备ID={}  功能类型={}", param.getDeviceId(), param.getIdentifier());
         IotMainSearch search = new IotMainSearch();
         BeanUtils.copyProperties(param, search);
+        // 真实设备的topic
         search.setIotDataType(IotDataType.Device);
         Pageable pageable = PageRequest.of(0, Integer.MAX_VALUE);
         Page<IotMain> page = iotMainDao.page(pageable, search);
@@ -86,7 +87,7 @@ public class IotSendMessageService extends SuperService {
             log.error("没有对应的物模型  {}", param.getIdentifier());
             return ResultContent.buildFail("没有对应的设备物模型");
         }
-        // list 去重
+        // list 根据 topic 去重
         list = list.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(
                 () -> new TreeSet<>(Comparator.comparing(IotMain::getRealIotTopic))), ArrayList::new));