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

This commit is contained in:
疯狂的狮子li 2021-05-29 18:41:32 +08:00
parent ead1136e31
commit b7bd67b4cb
4 changed files with 6 additions and 6 deletions

View File

@ -145,7 +145,7 @@ public class DataScopeAspect
if (StrUtil.isNotBlank(sqlString.toString()))
{
putDataScope(joinPoint, " AND (" + sqlString.substring(4) + ")");
putDataScope(joinPoint, sqlString.substring(4));
}
}

View File

@ -40,7 +40,7 @@
AND status = #{status}
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
AND ( ${params.dataScope} )
order by d.parent_id, d.order_num
</select>

View File

@ -81,7 +81,7 @@
and date_format(r.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
AND ( ${params.dataScope} )
order by r.role_sort
</select>

View File

@ -135,7 +135,7 @@
ancestors) ))
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
AND ( ${params.dataScope} )
</select>
<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">