update 优化数据权限sql 解决MP apply注入附带 AND 语法问题
| | |
| | | |
| | | if (StrUtil.isNotBlank(sqlString.toString())) |
| | | { |
| | | putDataScope(joinPoint, " AND (" + sqlString.substring(4) + ")"); |
| | | putDataScope(joinPoint, sqlString.substring(4)); |
| | | } |
| | | } |
| | | |
| | |
| | | AND status = #{status} |
| | | </if> |
| | | <!-- 数据范围过滤 --> |
| | | ${params.dataScope} |
| | | AND ( ${params.dataScope} ) |
| | | order by d.parent_id, d.order_num |
| | | </select> |
| | | |
| | |
| | | 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> |
| | | |
| | |
| | | ancestors) )) |
| | | </if> |
| | | <!-- 数据范围过滤 --> |
| | | ${params.dataScope} |
| | | AND ( ${params.dataScope} ) |
| | | </select> |
| | | |
| | | <select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult"> |