|
@@ -325,7 +325,6 @@ public class IdentityAppService : IIdentityAppService, IScopeDependency
|
|
thirdDto.Secret = _systemSettingCacheManager.WxOpenAppSecret;
|
|
thirdDto.Secret = _systemSettingCacheManager.WxOpenAppSecret;
|
|
}
|
|
}
|
|
var thirdToken = await _thirdIdentiyService.GetTokenAsync(thirdDto);
|
|
var thirdToken = await _thirdIdentiyService.GetTokenAsync(thirdDto);
|
|
- _systemLog.Add("第三方登录", thirdDto.ToJson(), thirdToken.ToJson(), status: 1);
|
|
|
|
var phone = await _thirdIdentiyService.GetPhoneNumberAsync(thirdDto);
|
|
var phone = await _thirdIdentiyService.GetPhoneNumberAsync(thirdDto);
|
|
var thirdAccount = await _thirdAccountRepository.GetByOpenIdAsync(thirdToken.OpenId);
|
|
var thirdAccount = await _thirdAccountRepository.GetByOpenIdAsync(thirdToken.OpenId);
|
|
|
|
|
|
@@ -344,7 +343,7 @@ public class IdentityAppService : IIdentityAppService, IScopeDependency
|
|
else
|
|
else
|
|
{
|
|
{
|
|
var citizen = await _citizenRepository.Queryable().Where(m => m.PhoneNumber == phone.PhoneNumber).FirstAsync();
|
|
var citizen = await _citizenRepository.Queryable().Where(m => m.PhoneNumber == phone.PhoneNumber).FirstAsync();
|
|
- thirdAccount.UserId = citizen.Id;
|
|
|
|
|
|
+ thirdAccount.UserId = citizen?.Id;
|
|
}
|
|
}
|
|
thirdAccount.Id = await _thirdAccountRepository.AddAsync(thirdAccount);
|
|
thirdAccount.Id = await _thirdAccountRepository.AddAsync(thirdAccount);
|
|
}
|
|
}
|