in paimon-web-server/src/main/java/org/apache/paimon/web/server/configrue/MybatisPlusConfig.java [45:67]
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(
new TenantLineInnerInterceptor(
new TenantLineHandler() {
@Override
public Expression getTenantId() {
Long tenantId = TenantContextHolder.get();
if (tenantId == null) {
return new NullValue();
}
return new LongValue(tenantId);
}
@Override
public boolean ignoreTable(String tableName) {
return !TENANT_TABLE_NAMES.contains(tableName);
}
}));
interceptor.addInnerInterceptor(new PaginationInnerInterceptor());
return interceptor;
}