Merge remote-tracking branch 'base-version/main' into dev
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
package com.zt.plat.framework.tenant.core.context;
|
package com.zt.plat.framework.tenant.core.context;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.zt.plat.framework.common.enums.DocumentEnum;
|
|
||||||
import com.alibaba.ttl.TransmittableThreadLocal;
|
import com.alibaba.ttl.TransmittableThreadLocal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -38,8 +36,10 @@ public class TenantContextHolder {
|
|||||||
public static Long getRequiredTenantId() {
|
public static Long getRequiredTenantId() {
|
||||||
Long tenantId = getTenantId();
|
Long tenantId = getTenantId();
|
||||||
if (tenantId == null) {
|
if (tenantId == null) {
|
||||||
throw new NullPointerException("TenantContextHolder 不存在租户编号!可参考文档:"
|
// throw new NullPointerException("TenantContextHolder 不存在租户编号!可参考文档:"
|
||||||
+ DocumentEnum.TENANT.getUrl());
|
// + DocumentEnum.TENANT.getUrl());
|
||||||
|
// 暂定所有获取不到租户的操作,默认都使用主租户进行操作 1l
|
||||||
|
tenantId = 1L;
|
||||||
}
|
}
|
||||||
return tenantId;
|
return tenantId;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user