类 BaseMultiTableInnerInterceptor

java.lang.Object
com.baomidou.mybatisplus.extension.parser.JsqlParserSupport
com.baomidou.mybatisplus.extension.plugins.inner.BaseMultiTableInnerInterceptor
所有已实现的接口:
InnerInterceptor
直接已知子类:
DataPermissionInterceptor, TenantLineInnerInterceptor

public abstract class BaseMultiTableInnerInterceptor extends JsqlParserSupport implements InnerInterceptor
多表条件处理基对象,从原有的 TenantLineInnerInterceptor 拦截器中提取出来
从以下版本开始:
3.5.2
作者:
houkunlin
  • 构造器详细资料

    • BaseMultiTableInnerInterceptor

      public BaseMultiTableInnerInterceptor()
  • 方法详细资料

    • processSelectBody

      protected void processSelectBody(net.sf.jsqlparser.statement.select.Select selectBody, String whereSegment)
    • andExpression

      protected net.sf.jsqlparser.expression.Expression andExpression(net.sf.jsqlparser.schema.Table table, net.sf.jsqlparser.expression.Expression where, String whereSegment)
      delete update 语句 where 处理
    • processPlainSelect

      protected void processPlainSelect(net.sf.jsqlparser.statement.select.PlainSelect plainSelect, String whereSegment)
      处理 PlainSelect
    • processWhereSubSelect

      protected void processWhereSubSelect(net.sf.jsqlparser.expression.Expression where, String whereSegment)
      处理where条件内的子查询

      支持如下:

      1. in
      2. =
      3. >
      4. <
      5. >=
      6. <=
      7. <>
      8. EXISTS
      9. NOT EXISTS

      前提条件: 1. 子查询必须放在小括号中 2. 子查询一般放在比较操作符的右边

      参数:
      where - where 条件
    • processSelectItem

      protected void processSelectItem(net.sf.jsqlparser.statement.select.SelectItem selectItem, String whereSegment)
    • processFunction

      protected void processFunction(net.sf.jsqlparser.expression.Function function, String whereSegment)
      处理函数

      支持: 1. select fun(args..) 2. select fun1(fun2(args..),args..)

      fixed gitee pulls/141

      参数:
      function -
    • processOtherFromItem

      protected void processOtherFromItem(net.sf.jsqlparser.statement.select.FromItem fromItem, String whereSegment)
      处理子查询等
    • builderExpression

      protected net.sf.jsqlparser.expression.Expression builderExpression(net.sf.jsqlparser.expression.Expression currentExpression, List<net.sf.jsqlparser.schema.Table> tables, String whereSegment)
      处理条件
    • buildTableExpression

      public abstract net.sf.jsqlparser.expression.Expression buildTableExpression(net.sf.jsqlparser.schema.Table table, net.sf.jsqlparser.expression.Expression where, String whereSegment)
      构建数据库表的查询条件
      参数:
      table - 表对象
      where - 当前where条件
      whereSegment - 所属Mapper对象全路径
      返回:
      需要拼接的新条件(不会覆盖原有的where条件,只会在原有条件上再加条件),为 null 则不加入新的条件
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • equals

      public boolean equals(Object o)
      覆盖:
      equals 在类中 Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object