using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System;
using System.Threading.Tasks;

namespace Bailun.DC.SkuStatistics
{
    class Program
    {
        /// <summary>
        /// 同步SKU库存、缺货、待发货、在途、销量数据
        /// </summary>
        /// <param name="args"></param>
        static async Task Main(string[] args)
        {
            Console.WriteLine("启动服务 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
            {
                services.AddHostedService<Services>();
            });

            await builder.RunConsoleAsync();
        }

        //static void Main(string[] args)
        //{
        //    //Console.WriteLine("Hello World!");

        //    var _service = new Services();
        //    //_service.UpdateStock();
        //    //_service.UpdateOnWay();
        //    //_service.UpdateShipping();
        //    //_service.UpdateSale();

        //}

    }
}
