暂态事件查询事件

This commit is contained in:
huangzj
2023-09-06 14:19:55 +08:00
parent 3035011064
commit 1d6b39609b
15 changed files with 91 additions and 15 deletions

View File

@@ -1,5 +1,6 @@
package com.njcn.influx.service;
import com.njcn.influx.pojo.dto.EventDataSetDTO;
import com.njcn.influx.pojo.dto.EventQueryDTO;
import com.njcn.influx.pojo.dto.StatisticalDataDTO;
import com.njcn.influx.pojo.po.cs.EntData;
@@ -24,5 +25,8 @@ public interface EvtDataService {
* @Author: clam
* @Date: 2023/8/30
*/
@Deprecated
List<EntData> getEventData(EventQueryDTO eventQueryDTO);
EventDataSetDTO getEventDataSet(String tableName,String uuid,String columnName );
}

View File

@@ -3,6 +3,7 @@ package com.njcn.influx.service.impl;
import com.njcn.influx.imapper.CommonMapper;
import com.njcn.influx.imapper.EvtDataMapper;
import com.njcn.influx.pojo.constant.InfluxDBTableConstant;
import com.njcn.influx.pojo.dto.EventDataSetDTO;
import com.njcn.influx.pojo.dto.EventQueryDTO;
import com.njcn.influx.pojo.dto.StatisticalDataDTO;
import com.njcn.influx.pojo.po.cs.EntData;
@@ -26,6 +27,7 @@ import java.util.List;
public class EvtDataServiceImpl implements EvtDataService {
private final EvtDataMapper commonMapper;
@Override
@Deprecated
public List<EntData> getEventData(EventQueryDTO eventQueryDTO) {
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper("evt_data", EntData.class);
influxQueryWrapper.select(EntData::getLineId,EntData::getTarget,EntData::getTime,EntData::getTime,
@@ -38,4 +40,14 @@ public class EvtDataServiceImpl implements EvtDataService {
return commonMapper.getEventData(influxQueryWrapper);
}
@Override
public EventDataSetDTO getEventDataSet(String tableName, String uuid, String columnName) {
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(tableName, EventDataSetDTO.class);
influxQueryWrapper.select(columnName,InfluxDBTableConstant.VALUE)
.eq(InfluxDBTableConstant.UUID,uuid);
return commonMapper.getEventDataSet(influxQueryWrapper);
}
}