Merge branch 'dev' into test

This commit is contained in:
chenbowen
2025-12-25 17:31:52 +08:00

View File

@@ -1,7 +1,5 @@
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;
/**
@@ -38,8 +36,10 @@ public class TenantContextHolder {
public static Long getRequiredTenantId() {
Long tenantId = getTenantId();
if (tenantId == null) {
throw new NullPointerException("TenantContextHolder 不存在租户编号!可参考文档:"
+ DocumentEnum.TENANT.getUrl());
// throw new NullPointerException("TenantContextHolder 不存在租户编号!可参考文档:"
// + DocumentEnum.TENANT.getUrl());
// 暂定所有获取不到租户的操作,默认都使用主租户进行操作 1l
tenantId = 1L;
}
return tenantId;
}