Parcourir la source

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

guoqiang il y a 6 mois
Parent
commit
4e6cc3fcc4

+ 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"); // 只取一条记录