using Hotline.Application.OrderApp.OrderVisitApp;
using Hotline.BatchTask;
using Hotline.Share.Dtos.Order.OrderVisit;
using Microsoft.AspNetCore.Mvc;

namespace Hotline.Api.Controllers.OrderApi;

public class OrderVisitController : BaseController
{
    private readonly IOrderVisitApplication _orderVisitApplication;

    public OrderVisitController(IOrderVisitApplication orderVisitApplication)
    {
        _orderVisitApplication = orderVisitApplication;
    }

    /// <summary>
    /// 批量语音回访
    /// </summary>
    /// <returns></returns>
    [HttpPost("batch-voice")]
    public Task BatchVoiceVisit([FromBody] BatchVoiceVisitRequest request) => 
        _orderVisitApplication.AddTaskBatchVoiceVisitAsync(request, HttpContext.RequestAborted);
}