username@email.com
2021-07-16 265f38a3f69276ae97690da64fb8e42be3a940e5
zhengcaioa/zhengcaioa/Timer/TimerGetShopUsersService.cs
@@ -1,5 +1,6 @@
using DTO;
using IServices;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
@@ -25,6 +26,7 @@
        private readonly IConfiguration _configuration;
        private readonly ILiaotianService _liaotianService;
        private readonly IHttpClientFactory _clientFactory;
        private readonly IDtChannelArticleNewsService _dtChannelArticleNewsService;
        public TimerGetShopUsersService(ILogger<TimerGetShopUsersService> logger, IServiceScopeFactory factory)
        {
@@ -32,6 +34,7 @@
            _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)
@@ -52,6 +55,7 @@
                    try
                    {
                        await this.huoquhuiyuanAsync();
                    }
@@ -76,6 +80,17 @@
        {
            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()
        {