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

30 lines
1005 B
Java
Raw Normal View History

2024-09-14 09:21:32 +08:00
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);
}
}