diff --git a/mallinkCApi/src/main/java/com/iformall/controller/BaseController.java b/mallinkCApi/src/main/java/com/iformall/controller/BaseController.java index f4cf955ac..84e3d4e95 100644 --- a/mallinkCApi/src/main/java/com/iformall/controller/BaseController.java +++ b/mallinkCApi/src/main/java/com/iformall/controller/BaseController.java @@ -96,15 +96,15 @@ public class BaseController { HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); String tenantId = (String) request.getAttribute(Constant.TENANT_ID); String parentTenantId = (String) request.getAttribute(Constant.PARENT_TENANT_ID); - TenantEntity tenantEntity = new TenantEntity() {{ - setTenantId(tenantId); - setParentTenantId(parentTenantId); - }}; + TenantEntity tenantEntity = new TenantEntity() ; + tenantEntity.setTenantId(tenantId); + tenantEntity.setParentTenantId(parentTenantId); return tenantEntity; } public String getFinalTenantId() { TenantEntity tenantEntity = getTenantInfo(); + String tenantId = tenantEntity.getTenantId(); return tenantEntity.getFinalTenantId(); }