Explorar el Código

denglu

release_toaliyun_real
xhxu hace 5 años
padre
commit
67a2f6dd76
Se han modificado 1 ficheros con 10 adiciones y 5 borrados
  1. +10
    -5
      mallinkCApi/src/main/java/com/iformall/controller/WxUserGrantController.java

+ 10
- 5
mallinkCApi/src/main/java/com/iformall/controller/WxUserGrantController.java Ver fichero

@@ -267,11 +267,13 @@ public class WxUserGrantController extends BaseController {


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


Cargando…
Cancelar
Guardar