Commit 4339cac3 authored by 高宇's avatar 高宇

Merge remote-tracking branch 'origin/master'

parents 7758c0d8 4ce00594
...@@ -27,6 +27,7 @@ public class UserInfo { ...@@ -27,6 +27,7 @@ public class UserInfo {
private Boolean refreshWechatInfo = true; private Boolean refreshWechatInfo = true;
//上次登录商圈id //上次登录商圈id
private Long tenantId; private Long tenantId;
private String tenantName;
public String getNickName() { public String getNickName() {
return StringUtil.isEmpty(nickName)?wechatNickName:nickName; return StringUtil.isEmpty(nickName)?wechatNickName:nickName;
} }
......
...@@ -11,6 +11,7 @@ import com.emall.flash.cache.CacheDao; ...@@ -11,6 +11,7 @@ import com.emall.flash.cache.CacheDao;
import com.emall.flash.security.UserService; import com.emall.flash.security.UserService;
import com.emall.flash.service.api.WeixinService; import com.emall.flash.service.api.WeixinService;
import com.emall.flash.service.shop.ShopUserService; import com.emall.flash.service.shop.ShopUserService;
import com.emall.flash.service.shop.TenantService;
import com.emall.flash.service.system.CfgService; import com.emall.flash.service.system.CfgService;
import com.emall.flash.utils.Maps; import com.emall.flash.utils.Maps;
import com.emall.flash.utils.RandomUtil; import com.emall.flash.utils.RandomUtil;
...@@ -44,6 +45,8 @@ public class WeChatController extends BaseController { ...@@ -44,6 +45,8 @@ public class WeChatController extends BaseController {
private CacheDao cacheDao; private CacheDao cacheDao;
@Autowired @Autowired
private CfgService cfgService; private CfgService cfgService;
@Autowired
private TenantService tenantService;
@RequestMapping(value = "getWxOpenId", method = RequestMethod.POST) @RequestMapping(value = "getWxOpenId", method = RequestMethod.POST)
public Object getWxOpenId(String code, HttpServletRequest request) { public Object getWxOpenId(String code, HttpServletRequest request) {
...@@ -112,6 +115,8 @@ public class WeChatController extends BaseController { ...@@ -112,6 +115,8 @@ public class WeChatController extends BaseController {
shopUserService.update(shopUser); shopUserService.update(shopUser);
UserInfo userInfo = new UserInfo(); UserInfo userInfo = new UserInfo();
BeanUtils.copyProperties(shopUser, userInfo); BeanUtils.copyProperties(shopUser, userInfo);
if (userInfo.getTenantId() != null)
userInfo.setTenantName(tenantService.get(userInfo.getTenantId()).getName());
userInfo.setRefreshWechatInfo(false); userInfo.setRefreshWechatInfo(false);
Map result = Maps.newHashMap( Map result = Maps.newHashMap(
"user", userInfo, "user", userInfo,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment