add log
This commit is contained in:
@@ -12,11 +12,13 @@ namespace Dlhis.ScheduledTask.Common.Services.Implements;
|
||||
public class JinkoSapService : IJinkoSapService
|
||||
{
|
||||
private readonly IDbContext _dbContext;
|
||||
private readonly ILogger<JinkoSapService> _logger;
|
||||
private readonly IHttpClientFactory _httpClientFactory;
|
||||
|
||||
public JinkoSapService(IHttpClientFactory httpClientFactory, IDbContext dbContext)
|
||||
public JinkoSapService(IHttpClientFactory httpClientFactory, IDbContext dbContext, ILogger<JinkoSapService> 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<SapPersonResponse>(jsonResponse);
|
||||
|
||||
Reference in New Issue
Block a user