refactor(extension/tenant): 移除超级租户 ID 配置属性

- 删除了 DefaultTenantLineHandler 中关于超级租户的判断逻辑
- 移除了 TenantProperties 中的 superTenantId 相关配置项
This commit is contained in:
2025-07-20 00:01:04 +08:00
parent e4d0c98838
commit a778e3182a
2 changed files with 0 additions and 18 deletions

View File

@@ -51,11 +51,6 @@ public class TenantProperties {
*/ */
private String tenantIdHeader = "X-Tenant-Id"; private String tenantIdHeader = "X-Tenant-Id";
/**
* 超级/默认租户 ID超管用户所在租户
*/
private Long superTenantId = 0L;
/** /**
* 忽略表(忽略拼接租户条件) * 忽略表(忽略拼接租户条件)
*/ */
@@ -93,14 +88,6 @@ public class TenantProperties {
this.tenantIdHeader = tenantIdHeader; this.tenantIdHeader = tenantIdHeader;
} }
public Long getSuperTenantId() {
return superTenantId;
}
public void setSuperTenantId(Long superTenantId) {
this.superTenantId = superTenantId;
}
public List<String> getIgnoreTables() { public List<String> getIgnoreTables() {
return ignoreTables; return ignoreTables;
} }

View File

@@ -63,11 +63,6 @@ public class DefaultTenantLineHandler implements TenantLineHandler {
if (TenantContextHolder.isIgnore()) { if (TenantContextHolder.isIgnore()) {
return true; return true;
} }
// 忽略超级租户
Long tenantId = TenantContextHolder.getTenantId();
if (tenantId == null || tenantId.equals(tenantProperties.getSuperTenantId())) {
return true;
}
// 忽略数据源级隔离 // 忽略数据源级隔离
if (TenantIsolationLevel.DATASOURCE.equals(TenantContextHolder.getIsolationLevel())) { if (TenantIsolationLevel.DATASOURCE.equals(TenantContextHolder.getIsolationLevel())) {
return true; return true;