fix 修复 租户排除表数据不断增大问题
This commit is contained in:
parent
4450c06163
commit
ddc8acd978
@ -1,5 +1,6 @@
|
|||||||
package org.dromara.common.tenant.handle;
|
package org.dromara.common.tenant.handle;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.ListUtil;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler;
|
import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.satoken.utils.LoginHelper;
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
@ -45,11 +46,12 @@ public class PlusTenantLineHandler implements TenantLineHandler {
|
|||||||
// 不需要过滤租户的表
|
// 不需要过滤租户的表
|
||||||
List<String> excludes = tenantProperties.getExcludes();
|
List<String> excludes = tenantProperties.getExcludes();
|
||||||
// 非业务表
|
// 非业务表
|
||||||
excludes.addAll(List.of(
|
List<String> tables = ListUtil.toList(
|
||||||
"gen_table",
|
"gen_table",
|
||||||
"gen_table_column"
|
"gen_table_column"
|
||||||
));
|
);
|
||||||
return excludes.contains(tableName);
|
tables.addAll(excludes);
|
||||||
|
return tables.contains(tableName);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user