From 993755aece09ef32798c04cfdaf4921cd5572743 Mon Sep 17 00:00:00 2001
From: zyy3 <zyy3@zy.com>
Date: Sat, 08 Nov 2025 00:33:58 +0800
Subject: [PATCH] 1
---
src/main/resources/mapper/UserMapper.xml | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/main/resources/mapper/UserMapper.xml b/src/main/resources/mapper/UserMapper.xml
index 0211f5b..8ae0c4d 100644
--- a/src/main/resources/mapper/UserMapper.xml
+++ b/src/main/resources/mapper/UserMapper.xml
@@ -52,9 +52,10 @@
<include refid="Base_Column_List"/>
FROM user
<where>
- (agent_id = #{searchId} or
- agent_id in (select a.id FROM agent_user a left join agent_distribution_user d on a.id = d.agent_id WHERE d.parent_id = #{searchId})
- )
+ 1=1
+ <if test="searchId != null and searchId != '' ">
+ and agent_id = #{searchId}
+ </if>
<if test="realName != null and realName != '' ">
and real_name like CONCAT('%','${realName}','%')
</if>
--
Gitblit v1.9.3