上一个版本恢复不需要添加对应的方法了,直接更改通用查询方法
This commit is contained in:
@@ -89,9 +89,12 @@ public class CommonServiceImpl implements CommonService {
|
||||
.select(StatisticalDataDTO::getPhaseType)
|
||||
.select(StatisticalDataDTO::getValueType)
|
||||
.select(commonQueryParam.getColumnName(), InfluxDBTableConstant.VALUE)
|
||||
.eq(InfluxDBTableConstant.LINE_ID, commonQueryParam.getLineId())
|
||||
//查询条件开始和结束时间是必须的
|
||||
.between(InfluxDBTableConstant.TIME, commonQueryParam.getStartTime(), commonQueryParam.getEndTime());
|
||||
//此方法和getDeviceRtDataByTime方法逻辑一致,只是在以下条件判断中允许部分查询参数为空,也即可以不带入查询
|
||||
if(commonQueryParam.getLineId() != null) {
|
||||
influxQueryWrapper.eq(InfluxDBTableConstant.LINE_ID, commonQueryParam.getLineId());
|
||||
}
|
||||
if(commonQueryParam.getPhasic() != null) {
|
||||
influxQueryWrapper.eq(InfluxDBTableConstant.PHASIC_TYPE, commonQueryParam.getPhasic());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user