新增一些公共查询方法
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user