代码提交

This commit is contained in:
2023-06-21 09:20:53 +08:00
parent c5d469f6d1
commit 879d90d579
4 changed files with 44 additions and 0 deletions

View File

@@ -85,4 +85,14 @@ public class CommonServiceImpl implements CommonService {
.eq("value_type",dataType).groupBy("line_id");
return commonMapper.getDeviceRtDataByTime(influxQueryWrapper);
}
@Override
public StatisticalDataDTO getLineHistoryData(String lineId, String tableName, String columnName, String startTime, String endTime) {
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(tableName,StatisticalDataDTO.class);
influxQueryWrapper.max(columnName,"maxValue")
.min(columnName,"minValue")
.eq("line_id",lineId)
.between("time", startTime, endTime);
return commonMapper.getLineHistoryData(influxQueryWrapper);
}
}