mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-09 08:57:17 +08:00
refactor(extension/tenant): 移除超级租户 ID 配置属性
- 删除了 DefaultTenantLineHandler 中关于超级租户的判断逻辑 - 移除了 TenantProperties 中的 superTenantId 相关配置项
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
@@ -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;
|
||||||
|
Reference in New Issue
Block a user