fix(订单中心):租户模式开启后,存在tenantId=null的问题,如果=null则默认使用webApp
This commit is contained in:
+2
-1
@@ -37,10 +37,11 @@ public class TenantFilter extends OncePerRequestFilter {
|
||||
log.debug("请求URL: {}, 租户ID: {}", request.getRequestURI(), tenantId);
|
||||
|
||||
//保存租户id
|
||||
if (StrUtil.isNotEmpty(tenantId)) {
|
||||
if (StrUtil.isNotEmpty(tenantId) && null != tenantId) {
|
||||
TenantContextHolder.setTenant(tenantId);
|
||||
log.debug("设置租户上下文: {}", tenantId);
|
||||
} else {
|
||||
TenantContextHolder.setTenant("webApp");
|
||||
log.debug("未找到租户ID,使用默认租户");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user