新增一些公共查询方法

This commit is contained in:
guofeihu
2024-09-13 18:42:57 +08:00
parent ad5833f48a
commit 60afcb97cf
12 changed files with 138 additions and 3 deletions

View File

@@ -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);
}
}