|
|
@@ -141,6 +141,7 @@ private IWxAppConfigService wxAppConfigService;
|
|
|
ThirdSession thirdSession = ThirdSessionHolder.getThirdSession();
|
|
|
String key = CommonConstant.PREFIX_WX_APP_USER_TOKEN + token;
|
|
|
dto.setSessionKey(thirdSession.getSessionKey());
|
|
|
+ dto.setAppId(thirdSession.getAppId());
|
|
|
//解密获取手机号
|
|
|
LambdaQueryWrapper<WxAppConfig> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
lambdaQueryWrapper.eq(WxAppConfig::getAppId, dto.getAppId());
|
|
|
@@ -176,6 +177,7 @@ private IWxAppConfigService wxAppConfigService;
|
|
|
.eq(MallUserInfo::getMobile, mobile));
|
|
|
if (userInfo == null) {//不是商城用户,则新增
|
|
|
userInfo = new MallUserInfo();
|
|
|
+ userInfo.setTenantId(TenantContextHolder.getTenantId());
|
|
|
userInfo.setCreateTime(DateTime.now());
|
|
|
userInfo.setUpdateTime(DateTime.now());
|
|
|
}
|
|
|
@@ -214,6 +216,7 @@ private IWxAppConfigService wxAppConfigService;
|
|
|
String mallUserId = userInfo.getId();
|
|
|
wxUser.setUserId(mallUserId);
|
|
|
wxUser.setMobile(mobile);
|
|
|
+ wxUserService.saveOrUpdate(wxUser);
|
|
|
|
|
|
userInfo.setToken(StrUtil.removeAll(key, CommonConstant.PREFIX_WX_APP_USER_TOKEN));
|
|
|
//更新微信用户
|