From bc72c98cd11519b811829de5ec59b8a021e75946 Mon Sep 17 00:00:00 2001
From: ZhuDongming <773644075@qq.com>
Date: Thu, 25 Jul 2019 14:16:18 +0800
Subject: [PATCH] 查询无人机在时间段内sensor值的Mapper接口
---
src/main/resources/mapper/SensorUnitMapper.xml | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/SensorUnitMapper.xml b/src/main/resources/mapper/SensorUnitMapper.xml
index a24a98f..03d19ab 100644
--- a/src/main/resources/mapper/SensorUnitMapper.xml
+++ b/src/main/resources/mapper/SensorUnitMapper.xml
@@ -35,4 +35,28 @@
AND su.is_delete=0
AND mp.id = #{id}
</select>
+ <select id="getSensorUnitByDeviceMac" resultType="java.util.Map">
+ SELECT
+ su.* ,
+ s.sensor_key
+ FROM
+ device d,
+ sensor_unit su,
+ organization_sensor_unit osu,
+ monitor_point mp,
+ device_version_sensor dvs,
+ sensor s
+ WHERE
+ d.monitor_point_id = mp.id
+ AND su.is_delete = '0'
+ AND mp.organization_id = osu.organization_id
+ AND osu.sensor_unit_id = su.id
+ AND su.sensor_id = s.id
+ AND d.device_version_id = dvs.device_version_id
+ AND su.sensor_id = dvs.sensor_id
+ AND d.mac = #{mac}
+ <if test="sensorKey != null">
+ AND s.sensor_key = #{sensorKey}
+ </if>
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0