fix(系统设置): 用户组查看关联用户没有过滤已删除的用户
This commit is contained in:
parent
529968d6b5
commit
25d3f18875
|
@ -21,13 +21,13 @@
|
|||
FROM user
|
||||
LEFT JOIN user_extend ON user.id = user_extend.id
|
||||
WHERE (user.email = #{keyword} OR user.id = #{keyword})
|
||||
AND deleted IS FALSE
|
||||
AND deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="findAll" resultType="io.metersphere.system.domain.User">
|
||||
SELECT *
|
||||
FROM user
|
||||
where deleted IS FALSE
|
||||
where deleted = 0
|
||||
</select>
|
||||
|
||||
<insert id="batchSave">
|
||||
|
@ -71,14 +71,14 @@
|
|||
*
|
||||
</if>
|
||||
FROM user
|
||||
WHERE DELETED IS FALSE
|
||||
WHERE DELETED = 0
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND name LIKE CONCAT('%', #{keyword}, '%')
|
||||
OR email LIKE CONCAT('%', #{keyword}, '%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectUnDeletedUserIdByIdList" resultType="java.lang.String">
|
||||
SELECT * from `user` WHERE deleted IS FALSE AND id IN
|
||||
SELECT * from `user` WHERE deleted = 0 AND id IN
|
||||
<foreach collection="idList" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
@ -96,7 +96,7 @@
|
|||
<select id="getExcludeSelectOption" resultType="io.metersphere.sdk.dto.ExcludeOptionDTO">
|
||||
select id, name
|
||||
from user
|
||||
where deleted is false
|
||||
where deleted = 0
|
||||
</select>
|
||||
<select id="getSelectOptionByIdsWithDeleted" resultType="io.metersphere.sdk.dto.OptionDTO">
|
||||
SELECT id, name
|
||||
|
|
|
@ -14,18 +14,17 @@
|
|||
)
|
||||
</select>
|
||||
<select id="selectGlobalRoleByUserId" resultType="io.metersphere.system.domain.UserRoleRelation">
|
||||
SELECT * FROM
|
||||
user_role_relation
|
||||
WHERE
|
||||
user_id = #{userId}
|
||||
AND role_id IN (
|
||||
SELECT id FROM user_role WHERE type = 'SYSTEM' AND scope_id = 'global'
|
||||
)
|
||||
SELECT *
|
||||
FROM user_role_relation
|
||||
WHERE user_id = #{userId}
|
||||
AND role_id IN (SELECT id
|
||||
FROM user_role
|
||||
WHERE type = 'SYSTEM' AND scope_id = 'global')
|
||||
</select>
|
||||
<select id="listGlobal" resultType="io.metersphere.sdk.dto.UserRoleRelationUserDTO">
|
||||
select urr.id, u.id as userId, u.name, u.email, u.phone
|
||||
from user_role_relation urr
|
||||
inner join user u on urr.user_id = u.id and urr.role_id = #{request.roleId}
|
||||
inner join user u on urr.user_id = u.id and urr.role_id = #{request.roleId} and u.deleted = 0
|
||||
<if test="request.keyword != null">
|
||||
and (
|
||||
u.name like concat('%', #{request.keyword},'%')
|
||||
|
|
Loading…
Reference in New Issue