类 DataPermissionInterceptor
java.lang.Object
com.baomidou.mybatisplus.extension.parser.JsqlParserSupport
com.baomidou.mybatisplus.extension.plugins.inner.BaseMultiTableInnerInterceptor
com.baomidou.mybatisplus.extension.plugins.inner.DataPermissionInterceptor
- 所有已实现的接口:
com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor
public class DataPermissionInterceptor
extends BaseMultiTableInnerInterceptor
implements com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor
数据权限处理器
- 从以下版本开始:
- 3.5.2
- 作者:
- hubin
-
字段概要
从类继承的字段 com.baomidou.mybatisplus.extension.parser.JsqlParserSupport
logger -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidbeforePrepare(org.apache.ibatis.executor.statement.StatementHandler sh, Connection connection, Integer transactionTimeout) voidbeforeQuery(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement ms, Object parameter, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.session.ResultHandler resultHandler, org.apache.ibatis.mapping.BoundSql boundSql) net.sf.jsqlparser.expression.ExpressionbuildTableExpression(net.sf.jsqlparser.schema.Table table, net.sf.jsqlparser.expression.Expression where, String whereSegment) 构建数据库表的查询条件protected booleanbooleanprotected net.sf.jsqlparser.expression.ExpressiongetUpdateOrDeleteExpression(net.sf.jsqlparser.schema.Table table, net.sf.jsqlparser.expression.Expression where, String whereSegment) inthashCode()protected voidprocessDelete(net.sf.jsqlparser.statement.delete.Delete delete, int index, String sql, Object obj) delete 语句处理protected voidprocessSelect(net.sf.jsqlparser.statement.select.Select select, int index, String sql, Object obj) 查询protected voidprocessUpdate(net.sf.jsqlparser.statement.update.Update update, int index, String sql, Object obj) update 语句处理voidsetDataPermissionHandler(DataPermissionHandler dataPermissionHandler) protected void设置 where 条件toString()从类继承的方法 com.baomidou.mybatisplus.extension.plugins.inner.BaseMultiTableInnerInterceptor
andExpression, builderExpression, processFunction, processOtherFromItem, processPlainSelect, processSelectBody, processSelectItem, processWhereSubSelect从类继承的方法 com.baomidou.mybatisplus.extension.parser.JsqlParserSupport
parserMulti, parserSingle, processInsert, processParser从接口继承的方法 com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor
beforeGetBoundSql, beforeUpdate, setProperties, willDoQuery, willDoUpdate
-
构造器详细资料
-
DataPermissionInterceptor
public DataPermissionInterceptor() -
DataPermissionInterceptor
-
-
方法详细资料
-
beforeQuery
public void beforeQuery(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement ms, Object parameter, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.session.ResultHandler resultHandler, org.apache.ibatis.mapping.BoundSql boundSql) throws SQLException - 指定者:
beforeQuery在接口中com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor- 抛出:
SQLException
-
beforePrepare
public void beforePrepare(org.apache.ibatis.executor.statement.StatementHandler sh, Connection connection, Integer transactionTimeout) - 指定者:
beforePrepare在接口中com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor
-
processSelect
protected void processSelect(net.sf.jsqlparser.statement.select.Select select, int index, String sql, Object obj) 从类复制的说明:JsqlParserSupport查询- 覆盖:
processSelect在类中JsqlParserSupport
-
setWhere
protected void setWhere(net.sf.jsqlparser.statement.select.PlainSelect plainSelect, String whereSegment) 设置 where 条件- 参数:
plainSelect- 查询对象whereSegment- 查询条件片段
-
processUpdate
protected void processUpdate(net.sf.jsqlparser.statement.update.Update update, int index, String sql, Object obj) update 语句处理- 覆盖:
processUpdate在类中JsqlParserSupport
-
processDelete
protected void processDelete(net.sf.jsqlparser.statement.delete.Delete delete, int index, String sql, Object obj) delete 语句处理- 覆盖:
processDelete在类中JsqlParserSupport
-
getUpdateOrDeleteExpression
protected net.sf.jsqlparser.expression.Expression getUpdateOrDeleteExpression(net.sf.jsqlparser.schema.Table table, net.sf.jsqlparser.expression.Expression where, String whereSegment) -
buildTableExpression
public net.sf.jsqlparser.expression.Expression buildTableExpression(net.sf.jsqlparser.schema.Table table, net.sf.jsqlparser.expression.Expression where, String whereSegment) 从类复制的说明:BaseMultiTableInnerInterceptor构建数据库表的查询条件- 指定者:
buildTableExpression在类中BaseMultiTableInnerInterceptor- 参数:
table- 表对象where- 当前where条件whereSegment- 所属Mapper对象全路径- 返回:
- 需要拼接的新条件(不会覆盖原有的where条件,只会在原有条件上再加条件),为 null 则不加入新的条件
-
getDataPermissionHandler
-
setDataPermissionHandler
-
toString
-
equals
- 覆盖:
equals在类中BaseMultiTableInnerInterceptor
-
canEqual
-
hashCode
public int hashCode()
-