From 33ecbd69aca2ccc58d47f467f3f7266b37fa9dfc Mon Sep 17 00:00:00 2001
From: zhanzhiqin <895896009@qq.com>
Date: 星期五, 27 五月 2022 18:44:38 +0800
Subject: [PATCH] fix
---
dao/src/main/resources/mapper/PoleMapper.xml | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/dao/src/main/resources/mapper/PoleMapper.xml b/dao/src/main/resources/mapper/PoleMapper.xml
index cabb7c5..7e7b07f 100644
--- a/dao/src/main/resources/mapper/PoleMapper.xml
+++ b/dao/src/main/resources/mapper/PoleMapper.xml
@@ -71,7 +71,26 @@
</where>
GROUP BY t1.id
<if test="orderBy != null">
- ORDER BY ${orderBy}
+ ORDER BY ${orderBy}
</if>
</select>
+ <select id="getPoleListOnBinding" resultType="com.sandu.ximon.dao.domain.Pole">
+ SELECT
+ t1.*
+ FROM
+ pole t1
+ LEFT JOIN pole_group_relation t2 ON t1.id = t2.pole_id
+ LEFT JOIN pole_group t3 ON t3.group_id = t2.pole_group_id
+ <where>
+ <if test="userid != null">
+ AND (t1.user_id = #{userid} OR t1.client_id = #{userid})
+ </if>
+ <if test="keyword != null and keyword != ''">
+ AND ( t1.id LIKE CONCAT(CONCAT('%', #{keyword}), '%')
+ OR t1.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%'))
+ </if>
+ </where>
+ GROUP BY t1.id
+
+ </select>
</mapper>
--
Gitblit v1.9.3