From 3aa2f5aa4c7963e7bcfbc0d710c286c826338df9 Mon Sep 17 00:00:00 2001
From: kaiyu <404897439@qq.com>
Date: Wed, 02 Dec 2020 14:39:08 +0800
Subject: [PATCH] Merge branch 'master' of http://blit.7drlb.com:8888/r/screen_api_v2

---
 src/main/resources/mapper/DeviceVersionMapper.xml |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/DeviceVersionMapper.xml b/src/main/resources/mapper/DeviceVersionMapper.xml
index ad7b3db..05ece87 100644
--- a/src/main/resources/mapper/DeviceVersionMapper.xml
+++ b/src/main/resources/mapper/DeviceVersionMapper.xml
@@ -21,8 +21,27 @@
               device dev
           WHERE
               dev.monitor_point_id IN
-                ( SELECT id FROM monitor_point mpt WHERE mpt.organization_id = #{orgId,jdbcType=INTEGER} )
+                (
+                   SELECT id FROM monitor_point mpt
+                   WHERE mpt.organization_id = #{orgId,jdbcType=INTEGER}
+                )
               )
           order by dvn.create_time desc
   </select>
+    <select id="selectListByMpointId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+        SELECT
+        *
+        FROM
+        device_version dvn
+        WHERE
+        dvn.id IN (
+        SELECT DISTINCT
+        dev.device_version_id
+        FROM
+        device dev
+        WHERE
+        dev.monitor_point_id = #{mpointId,jdbcType=VARCHAR}
+        )
+        order by dvn.create_time desc
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0