diff --git a/Src/Dlhis.ScheduledTask/Common/Services/Implements/JinkoSapService.cs b/Src/Dlhis.ScheduledTask/Common/Services/Implements/JinkoSapService.cs index 5a03c131..b224e659 100644 --- a/Src/Dlhis.ScheduledTask/Common/Services/Implements/JinkoSapService.cs +++ b/Src/Dlhis.ScheduledTask/Common/Services/Implements/JinkoSapService.cs @@ -12,11 +12,13 @@ namespace Dlhis.ScheduledTask.Common.Services.Implements; public class JinkoSapService : IJinkoSapService { private readonly IDbContext _dbContext; + private readonly ILogger _logger; private readonly IHttpClientFactory _httpClientFactory; - public JinkoSapService(IHttpClientFactory httpClientFactory, IDbContext dbContext) + public JinkoSapService(IHttpClientFactory httpClientFactory, IDbContext dbContext, ILogger logger) { _dbContext = dbContext; + _logger = logger; _httpClientFactory = httpClientFactory; } @@ -89,7 +91,7 @@ public class JinkoSapService : IJinkoSapService var content = new StringContent(JsonConvert.SerializeObject(body), Encoding.UTF8, "application/json"); var response = await GetHttpClient().PostAsync(apiUrl, content); response.EnsureSuccessStatusCode(); - + _logger.LogInformation("成功获取{Werk}人事范围数据", werk); var jsonResponse = await response.Content.ReadAsStringAsync(); var personResp = JsonConvert.DeserializeObject(jsonResponse);