From ad8f48f36b06dcaff77d07d0cb7a9b3c26247bf1 Mon Sep 17 00:00:00 2001 From: chenchun Date: Fri, 29 Aug 2025 11:53:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9C=8D=E5=8A=A1=E5=8F=B7=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BF=A1=E6=81=AF=E8=8E=B7=E5=8F=96=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Managers/Fuwuhao/FuwuhaoManager.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Managers/Fuwuhao/FuwuhaoManager.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Managers/Fuwuhao/FuwuhaoManager.cs index 84dfb571..90b1d8b2 100644 --- a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Managers/Fuwuhao/FuwuhaoManager.cs +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Managers/Fuwuhao/FuwuhaoManager.cs @@ -2,6 +2,7 @@ using System.Text; using System.Text.Json; using Microsoft.Extensions.Caching.Distributed; +using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Volo.Abp.Caching; using Volo.Abp.Domain.Services; @@ -17,15 +18,16 @@ public class FuwuhaoManager : DomainService private readonly IHttpClientFactory _httpClientFactory; private IDistributedCache _accessTokenCache; private ISqlSugarRepository _userRepository; - + private readonly ILogger _logger; public FuwuhaoManager(IOptions options, IHttpClientFactory httpClientFactory, ISqlSugarRepository userRepository, - IDistributedCache accessTokenCache) + IDistributedCache accessTokenCache, ILogger logger) { _options = options.Value; _httpClientFactory = httpClientFactory; _userRepository = userRepository; _accessTokenCache = accessTokenCache; + _logger = logger; } /// @@ -105,6 +107,8 @@ public class FuwuhaoManager : DomainService response.EnsureSuccessStatusCode(); var jsonContent = await response.Content.ReadAsStringAsync(); + + _logger.LogInformation($"服务号code获取用户基础信息:{jsonContent}"); var result = JsonSerializer.Deserialize(jsonContent, new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower @@ -128,6 +132,7 @@ public class FuwuhaoManager : DomainService response.EnsureSuccessStatusCode(); var jsonContent = await response.Content.ReadAsStringAsync(); + _logger.LogInformation($"服务号code获取用户详细信息:{jsonContent}"); var result = JsonSerializer.Deserialize(jsonContent, new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower