openId获取修改
This commit is contained in:
parent
09e1937c8e
commit
a0c3d4842c
|
|
@ -64,7 +64,7 @@ public class UserAuthorizationServiceImpl implements UserAuthorizationService {
|
||||||
} else {
|
} else {
|
||||||
JSONObject session = wechatAuthUtil.getSession(phoneDTO.getCode());
|
JSONObject session = wechatAuthUtil.getSession(phoneDTO.getCode());
|
||||||
String sessionKey = session.getString("session_key");
|
String sessionKey = session.getString("session_key");
|
||||||
openId = session.getString("openId");
|
openId = session.getString("openid");
|
||||||
userInfo = userInfoService.queryChain().eq(UserInfo::getAlipayOpenId, openId).one();
|
userInfo = userInfoService.queryChain().eq(UserInfo::getAlipayOpenId, openId).one();
|
||||||
String data = WxMaCryptUtils.decrypt(sessionKey, phoneDTO.getEncryptedData(), phoneDTO.getIv());
|
String data = WxMaCryptUtils.decrypt(sessionKey, phoneDTO.getEncryptedData(), phoneDTO.getIv());
|
||||||
JSONObject jsonObject = JSONObject.parseObject(data);
|
JSONObject jsonObject = JSONObject.parseObject(data);
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,6 @@ public class WechatAuthUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSessionKeyOrOpenId(String code, boolean isAccount) {
|
public String getSessionKeyOrOpenId(String code, boolean isAccount) {
|
||||||
return getSessionKey(code, "openId");
|
return getSessionKey(code, "openid");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue