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