类 TenantFilterInterceptor

  • 所有已实现的接口:
    SqlInterceptor

    public class TenantFilterInterceptor
    extends Object
    implements SqlInterceptor
    版本:
    v1.0, Date:2022年9月21日
    作者:
    zhongxuchen
    • 构造器详细资料

      • TenantFilterInterceptor

        public TenantFilterInterceptor()
    • 方法详细资料

      • decorate

        public SqlToyResult decorate​(SqlToyContext sqlToyContext,
                                     SqlToyConfig sqlToyConfig,
                                     OperateType operateType,
                                     SqlToyResult sqlToyResult,
                                     Class entityClass,
                                     Integer dbType)
        指定者:
        decorate 在接口中 SqlInterceptor
        参数:
        sqlToyContext - 支持getEntityMeta(tableName)获取表信息
        sqlToyConfig - 传递原本的sql配置,可以通过获取paramNames判断是否sql中已经有相关参数
        operateType - search\page\top\random\count 等,
        sqlToyResult - 存放了最终的sql 和paramValues
        entityClass - 实体对象类型(只针对对象crud操作才有值)
        dbType - 当前数据库类型,通过DBType.xxx 进行对比
        返回: