update 优化数据权限sql 解决MP apply注入附带 AND 语法问题
This commit is contained in:
parent
ead1136e31
commit
b7bd67b4cb
|
@ -145,7 +145,7 @@ public class DataScopeAspect
|
|||
|
||||
if (StrUtil.isNotBlank(sqlString.toString()))
|
||||
{
|
||||
putDataScope(joinPoint, " AND (" + sqlString.substring(4) + ")");
|
||||
putDataScope(joinPoint, sqlString.substring(4));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
AND status = #{status}
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
AND ( ${params.dataScope} )
|
||||
order by d.parent_id, d.order_num
|
||||
</select>
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
and date_format(r.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
AND ( ${params.dataScope} )
|
||||
order by r.role_sort
|
||||
</select>
|
||||
|
||||
|
@ -103,4 +103,4 @@
|
|||
WHERE r.del_flag = '0' and u.user_name = #{userName}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
ancestors) ))
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
AND ( ${params.dataScope} )
|
||||
</select>
|
||||
|
||||
<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
|
||||
|
@ -149,4 +149,4 @@
|
|||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue