From 944fcfc56ba96cb12466604d33194fc76965faa8 Mon Sep 17 00:00:00 2001
From: ZhuDongming <773644075@qq.com>
Date: Wed, 05 Jun 2019 10:14:06 +0800
Subject: [PATCH] 增加获取污染溯源接口
---
src/main/resources/mapper/HistoryMinutelyMapper.xml | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/main/resources/mapper/HistoryMinutelyMapper.xml b/src/main/resources/mapper/HistoryMinutelyMapper.xml
index 70c57d3..3a2d3c1 100644
--- a/src/main/resources/mapper/HistoryMinutelyMapper.xml
+++ b/src/main/resources/mapper/HistoryMinutelyMapper.xml
@@ -17,13 +17,11 @@
(SELECT
d.mac
FROM
- device d,
- monitor_point mp
+ device d
WHERE
d.is_delete = 0
- AND d.monitor_point_id = mp.id
<if test="monitorPointId != null">
- AND mp.id = #{monitorPointId}
+ AND d.monitor_point_id = #{monitorPointId}
</if>
<if test="mac != null">
AND d.mac = #{mac}
@@ -40,7 +38,7 @@
AVG(json->'$.${sensorKey}[0]') AS '${sensorKey}'
</foreach>
FROM
- history_minutely h
+ history_${timeUnits} h
WHERE
h.time >= #{start}
AND h.time <![CDATA[<]]> #{end}
--
Gitblit v1.8.0