openId获取修改

This commit is contained in:
张松 2025-03-10 11:19:15 +08:00
parent 09e1937c8e
commit a0c3d4842c
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ public class UserAuthorizationServiceImpl implements UserAuthorizationService {
} else {
JSONObject session = wechatAuthUtil.getSession(phoneDTO.getCode());
String sessionKey = session.getString("session_key");
openId = session.getString("openId");
openId = session.getString("openid");
userInfo = userInfoService.queryChain().eq(UserInfo::getAlipayOpenId, openId).one();
String data = WxMaCryptUtils.decrypt(sessionKey, phoneDTO.getEncryptedData(), phoneDTO.getIv());
JSONObject jsonObject = JSONObject.parseObject(data);

View File

@ -114,6 +114,6 @@ public class WechatAuthUtil {
}
public String getSessionKeyOrOpenId(String code, boolean isAccount) {
return getSessionKey(code, "openId");
return getSessionKey(code, "openid");
}
}