30 lines
947 B
Java
30 lines
947 B
Java
package com.njcn.influx.service.impl;
|
|
|
|
import com.njcn.influx.imapper.DataPltMapper;
|
|
import com.njcn.influx.pojo.po.*;
|
|
import com.njcn.influx.query.InfluxQueryWrapper;
|
|
import com.njcn.influx.service.DataPltService;
|
|
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 DataPltServiceImpl implements DataPltService {
|
|
|
|
private final DataPltMapper dataPltMapper;
|
|
|
|
@Override
|
|
public List<DataPlt> getNewDataPlt(String lineIndex, String startTime, String endTime) {
|
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataPlt.class);
|
|
influxQueryWrapper.eq(DataPlt::getLineId, lineIndex)
|
|
.between(DataPlt::getTime, startTime, endTime);;
|
|
return dataPltMapper.getStatisticsByWraper(influxQueryWrapper);
|
|
}
|
|
}
|