From b8b0683ebf3aedbca553a3365d05f5e602c94681 Mon Sep 17 00:00:00 2001
From: dd <gitluke@outlook.com>
Date: Thu, 06 Nov 2025 23:44:55 +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