From 72026a58219a4ee7cc41a7b37204da372d16d2aa Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Fri, 27 Nov 2020 16:45:10 +0800
Subject: [PATCH] 设备掉线报警邮件发送

---
 src/main/resources/mapper/DeviceMapper.xml |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/DeviceMapper.xml b/src/main/resources/mapper/DeviceMapper.xml
index 5b8fe34..75ff790 100644
--- a/src/main/resources/mapper/DeviceMapper.xml
+++ b/src/main/resources/mapper/DeviceMapper.xml
@@ -301,4 +301,12 @@
         where mac in
         <foreach item="item" collection="list" index="index" open="(" separator="," close=")">#{item}</foreach>
     </select>
+
+    <select id="getOfflineDevice" resultType="java.util.Map">
+        SELECT name,mac
+        from device
+        WHERE state=4 and is_delete=0 and monitor_point_id in
+        (SELECT id FROM monitor_point WHERE city_code!=130900 or (city_code=130900 and  organization_id  in (60, 65, 159, 165, 166) and id!=56 and id!=83 and id!=84))
+        and mac not in (SELECT mac FROM special_device_config);
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0