fix(项目管理): 修复用例管理下拉框人员为当前项目的所有人员

This commit is contained in:
guoyuqi 2024-02-05 18:12:10 +08:00 committed by Craftsman
parent c8e70124db
commit a39739e373
3 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ public interface ExtProjectUserRoleMapper {
List<User> getProjectUserList(@Param("sourceId") String sourceId); List<User> getProjectUserList(@Param("sourceId") String sourceId);
/** /**
* 根据关键字获取下拉框用户数据 * 根据关键字获取下拉框当前项目的用户数据
* @param projectId 项目ID * @param projectId 项目ID
* @param keyword 远程搜索时的关键字 name * @param keyword 远程搜索时的关键字 name
* @return List<User> * @return List<User>

View File

@ -54,8 +54,7 @@
u.name u.name
from `user` u from `user` u
left join user_role_relation urr on urr.user_id = u.id left join user_role_relation urr on urr.user_id = u.id
where urr.role_id = 'project_member' where urr.source_id = #{projectId}
and urr.source_id = #{projectId}
<if test="keyword != null and keyword != ''"> <if test="keyword != null and keyword != ''">
and u.name LIKE CONCAT('%', #{keyword}, '%') and u.name LIKE CONCAT('%', #{keyword}, '%')
</if> </if>

View File

@ -81,6 +81,7 @@
<if test="keyword != null and keyword != ''"> <if test="keyword != null and keyword != ''">
AND (name LIKE concat('%', #{keyword}, '%') OR email LIKE concat('%', #{keyword}, '%')) AND (name LIKE concat('%', #{keyword}, '%') OR email LIKE concat('%', #{keyword}, '%'))
</if> </if>
and u.deleted = false
GROUP BY urr.user_id GROUP BY urr.user_id
limit 100 limit 100
</select> </select>