using Hotline.Orders;
using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hotline.Application.Jobs
{
    public class SendOverTimeSmsJob : IJob, IDisposable
    {
        private readonly IOrderDomainService _orderDomainService;

        public SendOverTimeSmsJob(IOrderDomainService orderDomainService)
        {
            _orderDomainService = orderDomainService;
        }


        public void Dispose()
        {
            
        }

        public async Task Execute(IJobExecutionContext context)
        {
            Console.WriteLine($"{nameof(SendOverTimeSmsJob)} 执行, {DateTime.Now}");
            await _orderDomainService.SendOverTimeSms(context.CancellationToken);
        }
    }
}
