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/SensorMapper.xml | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/SensorMapper.xml b/src/main/resources/mapper/SensorMapper.xml
index b50c240..628c1b8 100644
--- a/src/main/resources/mapper/SensorMapper.xml
+++ b/src/main/resources/mapper/SensorMapper.xml
@@ -174,4 +174,28 @@
AND d.mac = #{mac}
</if>
</select>
+
+ <select id="selectSenosrsByOrgId" resultMap="BaseResultMap">
+ select
+ distinct dvs.sensor_id as id,
+ s.name,s.sensor_key,s.unit,s.description
+ from
+ device_version_sensor dvs,
+ sensor s
+ where
+ dvs.device_version_id
+ in(
+ select
+ distinct d.device_version_id
+ from
+ device d
+ where
+ d.mac in
+ <foreach collection="macs" open="(" separator="," close=")"
+ item="mac">
+ #{mac}
+ </foreach>
+ )
+ and dvs.sensor_id=s.id
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0