From 4f879df01e855d436c65e1fbdc74f64ce47c901b Mon Sep 17 00:00:00 2001
From: ZhuDongming <773644075@qq.com>
Date: Thu, 30 Apr 2020 16:49:15 +0800
Subject: [PATCH] update小时查询表时判断

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

diff --git a/src/main/resources/mapper/DeviceMapper.xml b/src/main/resources/mapper/DeviceMapper.xml
index 2932898..c2c17b5 100644
--- a/src/main/resources/mapper/DeviceMapper.xml
+++ b/src/main/resources/mapper/DeviceMapper.xml
@@ -216,7 +216,7 @@
 		</where>
 	</select>
 	<select id="selectByOrgIdAndMpId" resultMap="BaseResultMap">
-		SELECT dev.*,dve.version as device_version_value from device dev
+		SELECT dev.*,dve.version as device_version_value,mpt.* from device dev
 		left join monitor_point mpt on dev.monitor_point_id = mpt.id
 		left join device_version dve on dev.device_version_id = dve.id
 		<where>
@@ -414,4 +414,20 @@
 			</if>
 		)
 	</select>
+	
+	<select id="getLimitDataByDevice" resultType="String">
+		SELECT limit_val FROM view_device_density WHERE mac = #{mac}
+	</select>
+
+    <select id="getMacsByOrganizationId" resultType="string">
+        SELECT d.mac
+        FROM monitor_point mp, device d
+        WHERE mp.id = d.monitor_point_id
+        AND mp.organization_id IN
+        <foreach collection="organizationIdList" index="index" item="organizationId" open="(" separator="," close=")">
+            #{organizationId}
+        </foreach>
+        AND d.is_delete = '0'
+    </select>
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0