30 lines
1005 B
Java
30 lines
1005 B
Java
package com.njcn.influx.service.impl;
|
|
|
|
import com.njcn.influx.imapper.DataInHarmVMapper;
|
|
import com.njcn.influx.pojo.po.DataInHarmV;
|
|
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
import com.njcn.influx.service.DataInHarmVService;
|
|
import lombok.RequiredArgsConstructor;
|
|
import org.springframework.stereotype.Service;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* @author guofeihu
|
|
* @version 1.0.0
|
|
* @date 2024年09月13日 11:01
|
|
*/
|
|
@Service
|
|
@RequiredArgsConstructor
|
|
public class DataInHarmVServiceImpl implements DataInHarmVService {
|
|
|
|
private final DataInHarmVMapper dataInHarmVMapper;
|
|
|
|
@Override
|
|
public List<DataInHarmV> getNewDataInHarmV(String lineIndex, String startTime, String endTime) {
|
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataInHarmV.class);
|
|
influxQueryWrapper.eq(DataInHarmV::getLineId, lineIndex)
|
|
.between(DataInHarmV::getTime, startTime, endTime);;
|
|
return dataInHarmVMapper.getStatisticsByWraper(influxQueryWrapper);
|
|
}
|
|
}
|