diff --git a/src/main/java/com/njcn/influx/service/impl/CommonServiceImpl.java b/src/main/java/com/njcn/influx/service/impl/CommonServiceImpl.java index 4ea0e29..a6694e7 100644 --- a/src/main/java/com/njcn/influx/service/impl/CommonServiceImpl.java +++ b/src/main/java/com/njcn/influx/service/impl/CommonServiceImpl.java @@ -76,7 +76,10 @@ public class CommonServiceImpl implements CommonService { .eq(InfluxDBTableConstant.PHASIC_TYPE, commonQueryParam.getPhasic()) .eq(InfluxDBTableConstant.PROCESS, commonQueryParam.getProcess()) .between(InfluxDBTableConstant.TIME, commonQueryParam.getStartTime(), commonQueryParam.getEndTime()) - .eq(InfluxDBTableConstant.VALUE_TYPE, commonQueryParam.getDataType()).eq(InfluxDBTableConstant.CL_DID, commonQueryParam.getClDid()); + .eq(InfluxDBTableConstant.CL_DID, commonQueryParam.getClDid()); + if (commonQueryParam.getDataType() != null) { + influxQueryWrapper.eq(InfluxDBTableConstant.VALUE_TYPE, commonQueryParam.getDataType()); + } List deviceRtData = commonMapper.getDeviceRtDataByTime(influxQueryWrapper); resultList.addAll(deviceRtData); }