refactor(用例管理): 替换获取有评审权限的人员为项目成员
This commit is contained in:
parent
6a82fdf2ec
commit
48a1e03477
|
@ -14,7 +14,6 @@ import io.metersphere.functional.result.CaseManagementResultCode;
|
|||
import io.metersphere.project.dto.ModuleCountDTO;
|
||||
import io.metersphere.provider.BaseCaseProvider;
|
||||
import io.metersphere.sdk.constants.ApplicationNumScope;
|
||||
import io.metersphere.sdk.constants.PermissionConstants;
|
||||
import io.metersphere.sdk.exception.MSException;
|
||||
import io.metersphere.sdk.util.BeanUtils;
|
||||
import io.metersphere.system.dto.sdk.request.PosRequest;
|
||||
|
@ -322,14 +321,14 @@ public class CaseReviewService {
|
|||
}
|
||||
|
||||
/**
|
||||
* 获取具有评审权限的用户
|
||||
* 获取当前项目的所有用户
|
||||
*
|
||||
* @param projectId projectId
|
||||
* @param keyword 查询关键字,根据邮箱和用户名查询
|
||||
* @return List<User>
|
||||
*/
|
||||
public List<UserDTO> getReviewUserList(String projectId, String keyword) {
|
||||
return extUserMapper.getUserByPermission(projectId, keyword, PermissionConstants.CASE_REVIEW_REVIEW);
|
||||
return extUserMapper.getUserByKeyword(projectId, keyword);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,9 @@ public interface ExtUserMapper {
|
|||
*/
|
||||
List<UserDTO>getUserByPermission(@Param("projectId") String projectId, @Param("keyword") String keyword, @Param("permission") String permission);
|
||||
|
||||
List<UserDTO>getUserByKeyword(@Param("projectId") String projectId, @Param("keyword") String keyword);
|
||||
|
||||
|
||||
long countByIdAndPassword(@Param("userId") String id, @Param("password") String password);
|
||||
|
||||
long updatePasswordByUserId(@Param("userId") String id, @Param("password") String password);
|
||||
|
|
|
@ -71,6 +71,20 @@
|
|||
GROUP BY urr.user_id
|
||||
limit 100
|
||||
</select>
|
||||
|
||||
<select id="getUserByKeyword" resultType="io.metersphere.system.dto.user.UserDTO">
|
||||
SELECT u.id as id, u.name as name, u.email as email, ue.avatar as avatar
|
||||
FROM user u
|
||||
LEFT JOIN user_extend ue ON u.id = ue.id
|
||||
LEFT JOIN user_role_relation urr ON u.id = urr.user_id
|
||||
WHERE urr.source_id = #{projectId}
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (name LIKE concat('%', #{keyword}, '%') OR email LIKE concat('%', #{keyword}, '%'))
|
||||
</if>
|
||||
GROUP BY urr.user_id
|
||||
limit 100
|
||||
</select>
|
||||
|
||||
<select id="countByIdAndPassword" resultType="java.lang.Long">
|
||||
SELECT count(id)
|
||||
FROM user
|
||||
|
|
Loading…
Reference in New Issue