From 724c79463fc7c4f345fc2dd508aeab139b57afa5 Mon Sep 17 00:00:00 2001
From: zhanzhiqin <895896009@qq.com>
Date: 星期日, 24 四月 2022 14:14:54 +0800
Subject: [PATCH] fix

---
 dao/src/main/resources/mapper/MonitorMapper.xml |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/dao/src/main/resources/mapper/MonitorMapper.xml b/dao/src/main/resources/mapper/MonitorMapper.xml
index 4131ba5..0273808 100644
--- a/dao/src/main/resources/mapper/MonitorMapper.xml
+++ b/dao/src/main/resources/mapper/MonitorMapper.xml
@@ -62,20 +62,11 @@
                     #{deviceCode}
                 </foreach>
             </if>
-            <if test="keyword != null and keyword != ''">
-                AND t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
-                OR t1.device_serial LIKE CONCAT(CONCAT('%', #{keyword}), '%')
-                OR t1.note LIKE CONCAT(CONCAT('%', #{keyword}), '%')
-                OR t3.pole_code LIKE CONCAT(CONCAT('%', #{keyword}), '%')
-            </if>
             <if test="bindingState != 2">
                 AND t1.binding_state = #{bindingState}
             </if>
             <if test="equipmentState != 2">
                 AND t1.equipment_state = #{equipmentState}
-            </if>
-            <if test="userid != null">
-                AND (t3.user_id = #{userid} OR t3.client_id = #{userid})
             </if>
         </where>
     </select>
@@ -91,6 +82,12 @@
             <if test="userid != null">
                 AND (t3.user_id = #{userid} OR t3.client_id = #{userid})
             </if>
+            <if test="keyword != null and keyword != ''">
+                AND ( t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
+                OR t1.device_serial LIKE CONCAT(CONCAT('%', #{keyword}), '%')
+                OR t1.note LIKE CONCAT(CONCAT('%', #{keyword}), '%')
+                OR t3.pole_code LIKE CONCAT(CONCAT('%', #{keyword}), '%'))
+            </if>
         </where>
     </select>
 

--
Gitblit v1.9.3