From a4c1346fe8b37507d69413632848d30a5826efc6 Mon Sep 17 00:00:00 2001
From: xufenglei <xufenglei>
Date: Wed, 21 Nov 2018 09:25:08 +0800
Subject: [PATCH] 更新
---
src/main/resources/mapper/DeviceMapper.xml | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/DeviceMapper.xml b/src/main/resources/mapper/DeviceMapper.xml
index 16521ec..92d256a 100644
--- a/src/main/resources/mapper/DeviceMapper.xml
+++ b/src/main/resources/mapper/DeviceMapper.xml
@@ -362,4 +362,26 @@
AND mp.is_delete = 0
AND mp.organization_id = #{organizationId}
</select>
+
+
+ <select id="getDevicesStateByRegion" resultType="map">
+ SELECT
+ d.id deviceId,d.mac,d.state,d.name deviceName,
+ mp.id,mp.name
+ FROM
+ device d ,
+ monitor_point mp
+ <where>
+ d.monitor_point_id = mp.id
+ AND d.is_delete = 0
+ AND mp.is_delete = 0
+ AND mp.${regionType}_code = #{regionCode}
+ <if test="orgIds != null and orgIds.size > 0">
+ AND mp.organization_id IN
+ <foreach collection="orgIds" open="(" separator="," close=")" item="listItem">
+ #{listItem}
+ </foreach>
+ </if>
+ </where>
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0