use of cn.iocoder.yudao.framework.tenant.core.db.TenantDatabaseInterceptor in project ruoyi-vue-pro by YunaiV.
the class YudaoTenantAutoConfiguration method tenantLineInnerInterceptor.
// ========== DB ==========
@Bean
public TenantLineInnerInterceptor tenantLineInnerInterceptor(TenantProperties properties, MybatisPlusInterceptor interceptor) {
TenantLineInnerInterceptor inner = new TenantLineInnerInterceptor(new TenantDatabaseInterceptor(properties));
// 添加到 interceptor 中
// 需要加在首个,主要是为了在分页插件前面。这个是 MyBatis Plus 的规定
MyBatisUtils.addInterceptor(interceptor, inner, 0);
return inner;
}
Aggregations