From 46d898952af70bf72b3bf83d2ccd824a335c1f23 Mon Sep 17 00:00:00 2001
From: liuhaonan <31457034@qq.com>
Date: 星期一, 01 八月 2022 10:12:32 +0800
Subject: [PATCH] changes

---
 dao/src/main/resources/mapper/InterphoneSubMapper.xml  |    4 ++--
 dao/src/main/resources/mapper/InterphoneHostMapper.xml |    6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/dao/src/main/resources/mapper/InterphoneHostMapper.xml b/dao/src/main/resources/mapper/InterphoneHostMapper.xml
index 86f6a14..52fc8b7 100644
--- a/dao/src/main/resources/mapper/InterphoneHostMapper.xml
+++ b/dao/src/main/resources/mapper/InterphoneHostMapper.xml
@@ -24,7 +24,8 @@
     </resultMap>
 
     <sql id="Base_Column_List">
-        host_id,host_mac,host_ip,
+        host_id
+        ,host_mac,host_ip,
         url,host_address,
         sip_address,sip_port,
         sip_name,sip_auth,sip_password,
@@ -42,9 +43,10 @@
         LEFT JOIN pole t3 ON t3.id = t2.pole_id
 
         <where>
+            1=1
             <if test="keyword != null and keyword != ''">
                 AND(t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
-                OR t3.pole_id LIKE CONCAT(CONCAT('%', #{keyword}), '%')
+                OR t3.id LIKE CONCAT(CONCAT('%', #{keyword}), '%')
                 OR t1.host_mac LIKE CONCAT(CONCAT('%', #{keyword}), '%'))
             </if>
             <if test="clientId != null">
diff --git a/dao/src/main/resources/mapper/InterphoneSubMapper.xml b/dao/src/main/resources/mapper/InterphoneSubMapper.xml
index 6cd84b5..8c38ad8 100644
--- a/dao/src/main/resources/mapper/InterphoneSubMapper.xml
+++ b/dao/src/main/resources/mapper/InterphoneSubMapper.xml
@@ -44,8 +44,8 @@
 
         <where>
             <if test="keyword != null and keyword != ''">
-                AND(t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
-                OR t3.pole_id LIKE CONCAT(CONCAT('%', #{keyword}), '%')
+                (t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
+                OR t3.id LIKE CONCAT(CONCAT('%', #{keyword}), '%')
                 OR t1.sub_mac LIKE CONCAT(CONCAT('%', #{keyword}), '%'))
             </if>
             <if test="clientId != null">

--
Gitblit v1.9.3