新增一些公共查询方法

This commit is contained in:
guofeihu
2024-09-13 18:42:57 +08:00
parent ad5833f48a
commit 60afcb97cf
12 changed files with 138 additions and 3 deletions

View File

@@ -2,11 +2,14 @@ package com.njcn.influx.service.impl;
import com.njcn.influx.imapper.DataHarmRateVMapper;
import com.njcn.influx.pojo.po.DataHarmRateV;
import com.njcn.influx.pojo.po.DataV;
import com.njcn.influx.query.InfluxQueryWrapper;
import com.njcn.influx.service.DataHarmRateVService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author hongawen
* @version 1.0.0
@@ -23,4 +26,12 @@ public class DataHarmRateVServiceImpl implements DataHarmRateVService {
public DataHarmRateV getMeanAllTimesData(InfluxQueryWrapper influxQueryWrapper) {
return dataHarmRateVMapper.getMeanAllTimesData(influxQueryWrapper);
}
@Override
public List<DataHarmRateV> getNewDataHarmRateV(String lineIndex, String startTime, String endTime) {
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmRateV.class);
influxQueryWrapper.eq(DataHarmRateV::getLineId, lineIndex)
.between(DataHarmRateV::getTime, startTime, endTime);;
return dataHarmRateVMapper.getStatisticsByWraper(influxQueryWrapper);
}
}