修改时检查用户数据权限范围
This commit is contained in:
		@@ -30,6 +30,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 | 
			
		||||
	<select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult">
 | 
			
		||||
        <include refid="selectDeptVo"/>
 | 
			
		||||
        where d.del_flag = '0'
 | 
			
		||||
		<if test="deptId != null and deptId != 0">
 | 
			
		||||
			AND dept_id = #{deptId}
 | 
			
		||||
		</if>
 | 
			
		||||
        <if test="parentId != null and parentId != 0">
 | 
			
		||||
			AND parent_id = #{parentId}
 | 
			
		||||
		</if>
 | 
			
		||||
 
 | 
			
		||||
@@ -33,6 +33,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 | 
			
		||||
    <select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult">
 | 
			
		||||
		<include refid="selectRoleVo"/>
 | 
			
		||||
		where r.del_flag = '0'
 | 
			
		||||
		<if test="roleId != null and roleId != 0">
 | 
			
		||||
			AND r.role_id = #{roleId}
 | 
			
		||||
		</if>
 | 
			
		||||
		<if test="roleName != null and roleName != ''">
 | 
			
		||||
			AND r.role_name like concat('%', #{roleName}, '%')
 | 
			
		||||
		</if>
 | 
			
		||||
 
 | 
			
		||||
@@ -59,6 +59,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 | 
			
		||||
		select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
 | 
			
		||||
		left join sys_dept d on u.dept_id = d.dept_id
 | 
			
		||||
		where u.del_flag = '0'
 | 
			
		||||
		<if test="userId != null and userId != 0">
 | 
			
		||||
			AND u.user_id = #{userId}
 | 
			
		||||
		</if>
 | 
			
		||||
		<if test="userName != null and userName != ''">
 | 
			
		||||
			AND u.user_name like concat('%', #{userName}, '%')
 | 
			
		||||
		</if>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user