update 优化数据权限sql 解决MP apply注入附带 AND 语法问题

This commit is contained in:
疯狂的狮子li
2021-05-29 18:54:35 +08:00
parent b7bd67b4cb
commit 8d761fa60c
3 changed files with 15 additions and 5 deletions

View File

@ -106,7 +106,9 @@
ancestors) ))
</if>
<!-- 数据范围过滤 -->
${user.params.dataScope}
<if test="user.params.dataScope != null and user.params.dataScope != ''">
AND ( ${user.params.dataScope} )
</if>
</select>
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
@ -135,7 +137,9 @@
ancestors) ))
</if>
<!-- 数据范围过滤 -->
AND ( ${params.dataScope} )
<if test="params.dataScope != null and params.dataScope != ''">
AND ( ${params.dataScope} )
</if>
</select>
<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">