Преглед на файлове

Merge branch 'fpg-master' of 123.57.213.14:guoqiang.duan/zgzt-sys-java into fpg-master

guoqiang преди 6 месеца
родител
ревизия
4e6cc3fcc4
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      jeecg-module-gather/src/main/java/org/jeecg/modules/watch/MysqlWatch.java

+ 2 - 1
jeecg-module-gather/src/main/java/org/jeecg/modules/watch/MysqlWatch.java

@@ -77,8 +77,9 @@ public class MysqlWatch {
                 devicePointLambdaQueryWrapper.eq(DevicePoint::getDeviceId, device.getId());
                 List<DevicePoint> devicePoints = devicePointMapper.selectList(devicePointLambdaQueryWrapper);
 
-                // 查询 FpgGatherData 表中 createTime 最新的一条记录
+                // 查询 FpgGatherData 表中 该设备下的createTime 最新的一条记录
                 LambdaQueryWrapper<FpgGatherData> fpgGatherDataLambdaQueryWrapper = new LambdaQueryWrapper<>();
+                fpgGatherDataLambdaQueryWrapper.eq(FpgGatherData::getDeviceInformationId, device.getId());
                 fpgGatherDataLambdaQueryWrapper
                         .orderByDesc(FpgGatherData::getCreateTime) // 按 createTime 降序排序
                         .last("LIMIT 1"); // 只取一条记录