update [重大更新] 重写数据权限实现

This commit is contained in:
疯狂的狮子Li
2021-12-13 03:49:05 +00:00
parent 79fc16eeb7
commit aae3fe5305
24 changed files with 551 additions and 45 deletions

View File

@ -42,10 +42,10 @@
<if test="status != null and status != ''">
AND status = #{status}
</if>
<!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''">
AND ( ${params.dataScope} )
</if>
<!-- &lt;!&ndash; 数据范围过滤 &ndash;&gt;-->
<!-- <if test="params.dataScope != null and params.dataScope != ''">-->
<!-- AND ( ${params.dataScope} )-->
<!-- </if>-->
order by d.parent_id, d.order_num
</select>

View File

@ -60,10 +60,10 @@
<if test="role.params.endTime != null and role.params.endTime != ''"><!-- 结束时间检索 -->
and date_format(r.create_time,'%y%m%d') &lt;= date_format(#{role.params.endTime},'%y%m%d')
</if>
<!-- 数据范围过滤 -->
<if test="role.params.dataScope != null and role.params.dataScope != ''">
AND ( ${role.params.dataScope} )
</if>
<!-- &lt;!&ndash; 数据范围过滤 &ndash;&gt;-->
<!-- <if test="role.params.dataScope != null and role.params.dataScope != ''">-->
<!-- AND ( ${role.params.dataScope} )-->
<!-- </if>-->
order by r.role_sort
</select>
@ -88,10 +88,10 @@
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
and date_format(r.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if>
<!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''">
AND ( ${params.dataScope} )
</if>
<!-- &lt;!&ndash; 数据范围过滤 &ndash;&gt;-->
<!-- <if test="params.dataScope != null and params.dataScope != ''">-->
<!-- AND ( ${params.dataScope} )-->
<!-- </if>-->
order by r.role_sort
</select>

View File

@ -108,10 +108,10 @@
AND (u.dept_id = #{user.deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{user.deptId},
ancestors) ))
</if>
<!-- 数据范围过滤 -->
<if test="user.params.dataScope != null and user.params.dataScope != ''">
AND ( ${user.params.dataScope} )
</if>
<!-- &lt;!&ndash; 数据范围过滤 &ndash;&gt;-->
<!-- <if test="user.params.dataScope != null and user.params.dataScope != ''">-->
<!-- AND ( ${user.params.dataScope} )-->
<!-- </if>-->
</select>
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
@ -142,10 +142,10 @@
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId},
ancestors) ))
</if>
<!-- 数据范围过滤 -->
<if test="params.dataScope != null and params.dataScope != ''">
AND ( ${params.dataScope} )
</if>
<!-- &lt;!&ndash; 数据范围过滤 &ndash;&gt;-->
<!-- <if test="params.dataScope != null and params.dataScope != ''">-->
<!-- AND ( ${params.dataScope} )-->
<!-- </if>-->
</select>
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">