From d8bd5680f12b212d740ba7b8f5d641e3a327faca Mon Sep 17 00:00:00 2001
From: liuhaonan <konodioda2333@vip.qq.com>
Date: 星期二, 26 四月 2022 17:27:40 +0800
Subject: [PATCH] bug修复

---
 dao/src/main/resources/mapper/AirDataMapper.xml |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/dao/src/main/resources/mapper/AirDataMapper.xml b/dao/src/main/resources/mapper/AirDataMapper.xml
index bea20d9..ceab21a 100644
--- a/dao/src/main/resources/mapper/AirDataMapper.xml
+++ b/dao/src/main/resources/mapper/AirDataMapper.xml
@@ -32,10 +32,8 @@
     </resultMap>
 
     <select id="listAirEquipmentMAC" resultType="java.lang.String">
-            SELECT DISTINCT
-            device_mac
-            FROM
-             air_data
+        SELECT DISTINCT device_mac
+        FROM air_data
     </select>
 
 
@@ -77,4 +75,15 @@
             </foreach>
         </where>
     </select>
-</mapper>
\ No newline at end of file
+    <select id="getCodeByPoleId" resultType="java.lang.String">
+        select t1.device_code
+        from pole_binding t1
+        left join pole t2 on t1.pole_id = t2.id
+        where t1.device_type = 3
+        t1.pole_id = #{poleId}
+        <if test="userId != null">
+            AND (t2.user_id = #{clientId} OR t2.client_id = #{clientId})
+        </if>
+
+</select>
+        </mapper>
\ No newline at end of file

--
Gitblit v1.9.3