【修改】去除部门角色权限

This commit is contained in:
zer0Black
2022-04-17 17:42:11 +08:00
parent c79efc06ed
commit 37d277e872
4 changed files with 2 additions and 27 deletions
@@ -62,7 +62,6 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
/**
* 根据用户名设置部门ID
* @param username
* @param departId
*/
void updateUserDepart(@Param("username") String username,@Param("orgCode") String orgCode);
@@ -11,16 +11,6 @@
join sys_user_role d on d.role_id = c.id
join sys_user e on d.user_id = e.id
where e.username = #{username} and b.id = #{permissionId}
<!--update begin Author:lvdandan Date:20200213 for:加入部门权限 -->
union
select data_rule_ids
from sys_depart_role_permission a
join sys_permission b on a.permission_id = b.id
join sys_depart_role c on a.role_id = c.id
join sys_depart_role_user d on d.drole_id = c.id
join sys_user e on d.user_id = e.id
where e.username = #{username} and b.id = #{permissionId}
<!--update end Author:lvdandan Date:20200213 for:加入部门权限 -->
</select>
</mapper>
@@ -86,20 +86,6 @@
<if test="permission.url !=null and permission.url != ''">
and b.url = #{permission.url}
</if>
union all
select count(*) as cnt
from sys_permission z
join sys_depart_role_permission y on z.id = y.permission_id
join sys_depart_role x on y.role_id = x.id
join sys_depart_role_user w on w.drole_id = x.id
join sys_user v on w.user_id = v.id
where v.username = #{username}
<if test="permission.id !=null and permission.id != ''">
and z.id = #{permission.id}
</if>
<if test="permission.url !=null and permission.url != ''">
and z.url = #{permission.url}
</if>
) temp
</select>
@@ -34,7 +34,7 @@
)
</if>
<if test="username!=null and username!=''">
and username = #{username}
and username LIKE concat(concat('%',#{username}),'%')
</if>
</select>
@@ -42,7 +42,7 @@
<select id="getUserByRoleId" resultType="com.jero.modules.system.entity.SysUser">
select * from sys_user where del_flag = 0 and id in (select user_id from sys_user_role where role_id=#{roleId})
<if test="username!=null and username!=''">
and username = #{username}
and username LIKE concat(concat('%',#{username}),'%')
</if>
</select>