|
|
|
@@ -267,11 +267,13 @@ public class WxUserGrantController extends BaseController { |
|
|
|
|
|
|
|
resultMap.put("token", token); |
|
|
|
request.setAttribute(Constant.LOGIN_USER_KEY, oldUser.getId()); |
|
|
|
request.setAttribute(Constant.TENANT_ID, wxAuthorizerInfo.getTenantId()); |
|
|
|
request.setAttribute(Constant.TENANT_ID, oldUser.getTenantId()); |
|
|
|
|
|
|
|
if(StringUtils.isBlank(oldUser.getParentTenantId()) && StringUtils.isNotBlank(wxMall.getParentTenantId())){ |
|
|
|
oldUser.setParentTenantId(wxMall.getParentTenantId()); |
|
|
|
request.setAttribute(Constant.PARENT_TENANT_ID, wxMall.getParentTenantId()); |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank(oldUser.getParentTenantId())){ |
|
|
|
request.setAttribute(Constant.PARENT_TENANT_ID, oldUser.getParentTenantId()); |
|
|
|
} |
|
|
|
|
|
|
|
// 老用户,给出来已选中的mall |
|
|
|
@@ -291,9 +293,9 @@ public class WxUserGrantController extends BaseController { |
|
|
|
} |
|
|
|
} |
|
|
|
if (selectedMall != null) { |
|
|
|
request.setAttribute(Constant.PARENT_TENANT_ID, selectedMall.getParentTenantId()); |
|
|
|
request.setAttribute(Constant.TENANT_ID, selectedMall.getTenantId()); |
|
|
|
resultMap.put("selectedMall", selectedMall.getTenantId()); |
|
|
|
oldUser.setParentTenantId(selectedMall.getParentTenantId()); |
|
|
|
// oldUser.setParentTenantId(selectedMall.getParentTenantId()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@@ -371,11 +373,14 @@ public class WxUserGrantController extends BaseController { |
|
|
|
resultMap.put("token", token); |
|
|
|
request.setAttribute(Constant.LOGIN_USER_KEY, newUser.getId()); |
|
|
|
request.setAttribute(Constant.TENANT_ID, newUser.getTenantId()); |
|
|
|
if(StringUtils.isNotBlank(newUser.getParentTenantId())){ |
|
|
|
request.setAttribute(Constant.PARENT_TENANT_ID, newUser.getParentTenantId()); |
|
|
|
} |
|
|
|
if (mallList != null) { |
|
|
|
WxMall firstMall = mallList.get(0); |
|
|
|
if (firstMall != null) { |
|
|
|
// 默认选中第一个mall, 或者经纬度最近的那个 |
|
|
|
request.setAttribute(Constant.PARENT_TENANT_ID, firstMall.getTenantId()); |
|
|
|
request.setAttribute(Constant.TENANT_ID, firstMall.getTenantId()); |
|
|
|
resultMap.put("selectedMall", firstMall.getTenantId()); |
|
|
|
newUser.setParentTenantId(firstMall.getTenantId()); |
|
|
|
} |
|
|
|
|