38 lines
1.2 KiB
Java
38 lines
1.2 KiB
Java
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
|
|
* @date 2023年07月17日 11:02
|
|
*/
|
|
@Service
|
|
@RequiredArgsConstructor
|
|
public class DataHarmRateVServiceImpl implements DataHarmRateVService {
|
|
|
|
private final DataHarmRateVMapper dataHarmRateVMapper;
|
|
|
|
|
|
@Override
|
|
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);
|
|
}
|
|
}
|