Commit 729111aa authored by zhangsen's avatar zhangsen

跑马灯消息重复问题补充

parent 2e88c08a
...@@ -264,9 +264,11 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -264,9 +264,11 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
if (ObjectUtils.isEmpty(iotDatalist)) { if (ObjectUtils.isEmpty(iotDatalist)) {
return; return;
} }
int count = equipmentSpecificAlarmMapper.selectCountByIotCode(iotCode, iotDatalist.get(0).getKey(), String.valueOf(iotDatalist.get(0).getValue())); for (IotDataVO item : iotDatalist) {
if (count > 0) { int count = equipmentSpecificAlarmMapper.selectCountByIotCode(iotCode, item.getKey(), String.valueOf(item.getValue()));
return; if (count > 0) {
return;
}
} }
log.info(String.format("收到mqtt消息:%s", message)); log.info(String.format("收到mqtt消息:%s", message));
realTimeDateProcessing(topicEntity, iotDatalist); realTimeDateProcessing(topicEntity, iotDatalist);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment