From bde2512a915e394ab6f3939833469516c473ee0e Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Thu, 14 Jun 2018 11:49:17 +0800
Subject: [PATCH] EquDeviceAdapter 更新
---
src/main/resources/mapper/HistoryMinutelyMapper.xml | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/mapper/HistoryMinutelyMapper.xml b/src/main/resources/mapper/HistoryMinutelyMapper.xml
index 2688dd2..d9c4cd8 100644
--- a/src/main/resources/mapper/HistoryMinutelyMapper.xml
+++ b/src/main/resources/mapper/HistoryMinutelyMapper.xml
@@ -13,7 +13,20 @@
FROM
history_minutely
WHERE
- mac = #{mac}
+ mac IN
+ (SELECT
+ d.mac
+ FROM
+ device d
+ WHERE
+ d.is_delete = 0
+ <if test="monitorPointId != null">
+ AND d.monitor_point_id = #{monitorPointId}
+ </if>
+ <if test="mac != null">
+ AND d.mac = #{mac}
+ </if>
+ )
AND time >= #{start}
AND time < #{end}
</select>
--
Gitblit v1.8.0