【修复】修复公众号下微信支付异常获取openid匹配失败的问题。

This commit is contained in:
jianweie code
2024-06-01 19:46:46 +08:00
parent d3b8b9c2fa
commit 047db04ba5

View File

@@ -777,6 +777,14 @@ public class CoreCmsUserServices : BaseServices<CoreCmsUser>, ICoreCmsUserServic
}
}
else if (!string.IsNullOrEmpty(entity.sessionAuthId) && loginType == (int)GlobalEnumVars.LoginType.Sms)
{
var wxUserInfo = await _userWeChatInfoServices.QueryByClauseAsync(p => p.openid == entity.sessionAuthId && p.type == (int)GlobalEnumVars.UserAccountTypes.);
if (wxUserInfo != null)
{
await _userWeChatInfoServices.UpdateAsync(p => new CoreCmsUserWeChatInfo() { userId = userInfo.id }, p => p.openid == entity.sessionAuthId);
}
}
else if (!string.IsNullOrEmpty(entity.sessionAuthId) && loginType == (int)GlobalEnumVars.LoginType.AliPhoneNumber)
{
await _aliPayUserInfoServices.UpdateAsync(p => new CoreCmsAliPayUserInfo() { userInfoId = userInfo.id }, p => p.openId == entity.sessionAuthId || p.userId == entity.sessionAuthId);