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