| | |
| | | using DTO; |
| | | using IServices; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Microsoft.Extensions.Configuration; |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using Microsoft.Extensions.Hosting; |
| | |
| | | private readonly IConfiguration _configuration; |
| | | private readonly ILiaotianService _liaotianService; |
| | | private readonly IHttpClientFactory _clientFactory; |
| | | private readonly IDtChannelArticleNewsService _dtChannelArticleNewsService; |
| | | |
| | | public TimerGetShopUsersService(ILogger<TimerGetShopUsersService> logger, IServiceScopeFactory factory) |
| | | { |
| | |
| | | _configuration = factory.CreateScope().ServiceProvider.GetRequiredService<IConfiguration>(); |
| | | _liaotianService = factory.CreateScope().ServiceProvider.GetRequiredService<ILiaotianService>(); |
| | | _clientFactory = factory.CreateScope().ServiceProvider.GetRequiredService<IHttpClientFactory>(); |
| | | _dtChannelArticleNewsService = factory.CreateScope().ServiceProvider.GetRequiredService<IDtChannelArticleNewsService>(); |
| | | } |
| | | |
| | | protected override async Task ExecuteAsync(CancellationToken stoppingToken) |
| | |
| | | |
| | | try |
| | | { |
| | | |
| | | await this.huoquhuiyuanAsync(); |
| | | |
| | | } |
| | |
| | | { |
| | | base.Dispose(); |
| | | } |
| | | public void ceshi() |
| | | { |
| | | DtChannelArticleNewsDTOSearch searchEntity = new DtChannelArticleNewsDTOSearch(); |
| | | searchEntity.EndTime = DateTime.Parse("2021-07-15 12:06:30.893"); |
| | | searchEntity.AddTime = DateTime.Parse("2021-07-01 12:06:30.893"); |
| | | searchEntity.UserName = "yangjiameng"; |
| | | searchEntity.CategoryId = 85; |
| | | var dtChannelArticleNewsDTOs = _dtChannelArticleNewsService.GetList(searchEntity); |
| | | |
| | | _logger.LogInformation("dtChannelArticleNewsDTOs:"+ dtChannelArticleNewsDTOs.Count); |
| | | } |
| | | |
| | | public async Task huoquhuiyuanAsync() |
| | | { |