From e525cffa5ae93048d0ac1208d100e08bc69a4a3a Mon Sep 17 00:00:00 2001
From: zhanzhiqin <895896009@qq.com>
Date: 星期四, 06 一月 2022 14:52:51 +0800
Subject: [PATCH] fix

---
 dao/src/main/resources/mapper/WaterQualityEquipmentMapper.xml |   34 ++++++++--------------------------
 1 files changed, 8 insertions(+), 26 deletions(-)

diff --git a/dao/src/main/resources/mapper/WaterQualityEquipmentMapper.xml b/dao/src/main/resources/mapper/WaterQualityEquipmentMapper.xml
index dede1cf..6fe2d84 100644
--- a/dao/src/main/resources/mapper/WaterQualityEquipmentMapper.xml
+++ b/dao/src/main/resources/mapper/WaterQualityEquipmentMapper.xml
@@ -26,28 +26,6 @@
     </select>
 
 
-    <select id="WaterQualityEquipmentId" resultType="java.lang.Long">
-        SELECT
-        MAX(t1.id) AS water_quality_equipment_id
-        FROM
-        water_quality_equipment t1
-        <if test="keyword != null and keyword != ''">
-            LEFT JOIN pole_binding t2 ON t1.water_quality_equipment_code = t2.device_code
-            AND t2.device_type = 4
-            LEFT JOIN pole t3 ON t3.id = t2.pole_id
-        </if>
-        <where>
-            <if test="keyword != null and keyword != ''">
-                AND t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
-            </if>
-            <if test="clientId != null">
-                AND t3.client_id = #{clientId}
-            </if>
-        </where>
-        GROUP BY
-        t1.water_quality_equipment_code
-    </select>
-
     <select id="listWaterQualityEquipmentByIds" resultType="com.sandu.ximon.dao.bo.WaterQualityEquipmentBo">
         SELECT
         t1.*, t2.pole_id,
@@ -57,12 +35,16 @@
         LEFT JOIN pole_binding t2 ON t1.water_quality_equipment_code = t2.device_code
         AND t2.device_type = 4
         LEFT JOIN pole t3 ON t3.id = t2.pole_id
+
         <where>
-            t1.id IN
-            <foreach collection="waterQualityEquipmentIdList" open="(" close=")" item="airId" separator=",">
-                #{airId}
-            </foreach>
+            <if test="keyword != null and keyword != ''">
+                AND t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
+            </if>
+            <if test="clientId != null">
+                AND t3.client_id = #{clientId}
+            </if>
         </where>
     </select>
 
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3