Files
pqs-influx/src/main/java/com/njcn/influx/service/impl/DataHarmRateVServiceImpl.java

38 lines
1.2 KiB
Java
Raw Normal View History

2024-06-27 11:46:52 +08:00
package com.njcn.influx.service.impl;
import com.njcn.influx.imapper.DataHarmRateVMapper;
import com.njcn.influx.pojo.po.DataHarmRateV;
2024-09-13 18:42:57 +08:00
import com.njcn.influx.pojo.po.DataV;
2024-06-27 11:46:52 +08:00
import com.njcn.influx.query.InfluxQueryWrapper;
import com.njcn.influx.service.DataHarmRateVService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
2024-09-13 18:42:57 +08:00
import java.util.List;
2024-06-27 11:46:52 +08:00
/**
* @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);
}
2024-09-13 18:42:57 +08:00
@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);
}
2024-06-27 11:46:52 +08:00
}