package com.njcn.influx.service.impl; import com.njcn.influx.imapper.DataIMapper; import com.njcn.influx.pojo.po.DataI; import com.njcn.influx.query.InfluxQueryWrapper; import com.njcn.influx.service.IDataIService; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import java.util.List; /** * @author hongawen * @version 1.0.0 * @date 2023年07月17日 11:05 */ @Service @RequiredArgsConstructor public class IDataIServiceImpl implements IDataIService { private final DataIMapper dataIMapper; @Override public DataI getMeanAllTimesData(InfluxQueryWrapper influxQueryWrapper) { return dataIMapper.getMeanAllTimesData(influxQueryWrapper); } @Override public List getWeekDataI(String lineIndex, String startTime, String endTime) { List result1 ; InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataI.class); influxQueryWrapper .eq(DataI::getLineId, lineIndex) .eq(DataI::getValueType, "CP95") .ne(DataI::getPhaseType, "T") .between(DataI::getTime, startTime, endTime);; result1 = dataIMapper.getStatisticsByWraper(influxQueryWrapper); return result1; } }