From 52eb3f0befcb397d2fdd645c8d7471d6ee477f87 Mon Sep 17 00:00:00 2001
From: zhanzhiqin <895896009@qq.com>
Date: 星期一, 09 五月 2022 16:36:38 +0800
Subject: [PATCH] 权限

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

diff --git a/dao/src/main/resources/mapper/AirDataMapper.xml b/dao/src/main/resources/mapper/AirDataMapper.xml
index bea20d9..889c5c3 100644
--- a/dao/src/main/resources/mapper/AirDataMapper.xml
+++ b/dao/src/main/resources/mapper/AirDataMapper.xml
@@ -31,14 +31,6 @@
         <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
     </resultMap>
 
-    <select id="listAirEquipmentMAC" resultType="java.lang.String">
-            SELECT DISTINCT
-            device_mac
-            FROM
-             air_data
-    </select>
-
-
     <select id="listAirId" resultType="java.lang.Long">
         SELECT
         MAX(t1.id) AS air_id
@@ -77,4 +69,15 @@
             </foreach>
         </where>
     </select>
+    <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
+        and t1.pole_id = #{poleId}
+        <if test="clientId != null">
+            AND (t2.user_id = #{clientId} OR t2.client_id = #{clientId})
+        </if>
+
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3