From 7e3a88c7442fbdd942eec005d14de2ba7fbd5395 Mon Sep 17 00:00:00 2001
From: 沈斌 <bluelazysb@hotmail.com>
Date: Sat, 09 Jun 2018 10:53:43 +0800
Subject: [PATCH] updates
---
src/main/resources/mapper/HistoryMinutelyMapper.xml | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/mapper/HistoryMinutelyMapper.xml b/src/main/resources/mapper/HistoryMinutelyMapper.xml
index 2688dd2..70c57d3 100644
--- a/src/main/resources/mapper/HistoryMinutelyMapper.xml
+++ b/src/main/resources/mapper/HistoryMinutelyMapper.xml
@@ -13,7 +13,22 @@
FROM
history_minutely
WHERE
- mac = #{mac}
+ mac IN
+ (SELECT
+ d.mac
+ FROM
+ device d,
+ monitor_point mp
+ WHERE
+ d.is_delete = 0
+ AND d.monitor_point_id = mp.id
+ <if test="monitorPointId != null">
+ AND mp.id = #{monitorPointId}
+ </if>
+ <if test="mac != null">
+ AND d.mac = #{mac}
+ </if>
+ )
AND time >= #{start}
AND time < #{end}
</select>
--
Gitblit v1.8.0