|
@@ -1240,7 +1240,6 @@ public class WxLoginService implements IWxLoginService {
|
|
|
initData();
|
|
|
String param = String.format(gzh_wxAuthParam, gzh_appid, gzh_appsrcret, loginBody.getCode());
|
|
|
String resultString = HttpUtils.sendGet(gzh_wxAuthUrl, param);
|
|
|
- log.error("购买前获取公众号openid结果", resultString);
|
|
|
//解析json
|
|
|
JSONObject jsonObject = (JSONObject) JSONObject.parse(resultString);
|
|
|
String access_token = String.valueOf(jsonObject.get("access_token"));
|
|
@@ -1261,7 +1260,9 @@ public class WxLoginService implements IWxLoginService {
|
|
|
}
|
|
|
if (Validator.isEmpty(user.getGzhOpenId())) {
|
|
|
user.setGzhOpenId(openId);
|
|
|
- user.setUnionId(unionId);
|
|
|
+ if(Validator.isNotEmpty(unionId)&&!unionId.equals("null")){
|
|
|
+ user.setUnionId(unionId);
|
|
|
+ }
|
|
|
iUserService.updateById(user);
|
|
|
}
|
|
|
return user;
|