From a39739e3735950f4828cb0f124850b4ab5abc95b Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Mon, 5 Feb 2024 18:12:10 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=A8=E4=BE=8B=E7=AE=A1=E7=90=86=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E6=A1=86=E4=BA=BA=E5=91=98=E4=B8=BA=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=9A=84=E6=89=80=E6=9C=89=E4=BA=BA=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/project/mapper/ExtProjectUserRoleMapper.java | 2 +- .../metersphere/project/mapper/ExtProjectUserRoleMapper.xml | 5 ++--- .../main/java/io/metersphere/system/mapper/ExtUserMapper.xml | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectUserRoleMapper.java b/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectUserRoleMapper.java index dd80560111..6231f5f0d0 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectUserRoleMapper.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectUserRoleMapper.java @@ -49,7 +49,7 @@ public interface ExtProjectUserRoleMapper { List getProjectUserList(@Param("sourceId") String sourceId); /** - * 根据关键字获取下拉框用户数据 + * 根据关键字获取下拉框当前项目的用户数据 * @param projectId 项目ID * @param keyword 远程搜索时的关键字 (name) * @return List diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectUserRoleMapper.xml b/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectUserRoleMapper.xml index 200fc76fb1..4963cf31be 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectUserRoleMapper.xml +++ b/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectUserRoleMapper.xml @@ -53,9 +53,8 @@ select u.id, u.name from `user` u - left join user_role_relation urr on urr.user_id = u.id - where urr.role_id = 'project_member' - and urr.source_id = #{projectId} + left join user_role_relation urr on urr.user_id = u.id + where urr.source_id = #{projectId} and u.name LIKE CONCAT('%', #{keyword}, '%') diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtUserMapper.xml b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtUserMapper.xml index 3be2cabd43..7a1f51358b 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtUserMapper.xml +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtUserMapper.xml @@ -81,6 +81,7 @@ AND (name LIKE concat('%', #{keyword}, '%') OR email LIKE concat('%', #{keyword}, '%')) + and u.deleted = false GROUP BY urr.user_id limit 100