qinchaoyue 4 ay önce
ebeveyn
işleme
882d24d3a2

+ 6 - 1
src/Hotline.Application/Identity/IdentityAppService.cs

@@ -52,6 +52,8 @@ public class IdentityAppService : IIdentityAppService, IScopeDependency
     private readonly IThirdAccountRepository _thirdAccountRepository;
     private readonly IGuiderInfoRepository _guiderInfoRepository;
     private readonly IVolunteerRepository _volunteerRepository;
+    private readonly ISystemLogRepository _systemLog;
+
 
     public IdentityAppService(
         IAccountRepository accountRepository,
@@ -69,7 +71,8 @@ public class IdentityAppService : IIdentityAppService, IScopeDependency
         ISessionContext sessionContext,
         IRepository<Citizen> citizenRepository,
         IGuiderInfoRepository guiderInfoRepository,
-        IVolunteerRepository volunteerRepository)
+        IVolunteerRepository volunteerRepository,
+        ISystemLogRepository systemLog)
     {
         _accountRepository = accountRepository;
         _accountDomainService = accountDomainService;
@@ -87,6 +90,7 @@ public class IdentityAppService : IIdentityAppService, IScopeDependency
         _citizenRepository = citizenRepository;
         _guiderInfoRepository = guiderInfoRepository;
         _volunteerRepository = volunteerRepository;
+        _systemLog = systemLog;
     }
 
     public async Task<string> OldToNewLoginAsync(HotlineLoginOldToNewDto dto, CancellationToken cancellationToken)
@@ -321,6 +325,7 @@ public class IdentityAppService : IIdentityAppService, IScopeDependency
             thirdDto.Secret = _systemSettingCacheManager.WxOpenAppSecret;
         }
         var thirdToken = await _thirdIdentiyService.GetTokenAsync(thirdDto);
+        _systemLog.Add("第三方登录", thirdDto.ToJson(), thirdToken.ToJson(), status: 1);
         var phone = await _thirdIdentiyService.GetPhoneNumberAsync(thirdDto);
         var thirdAccount = await _thirdAccountRepository.GetByOpenIdAsync(thirdToken.OpenId);