using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.Threading.Tasks;
using XYY.Core.Standard.Mvc;
using XYY.Service.Standard.Finance.Charging.CustomerOrderFee;

namespace XYY.Api.Finance.Charges.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class OrderChargingLogsController : ApiControllerBase
    {
        IOrder_ChargesService _chargesService;
        private IChargeLogService _chargeLogService;

        public OrderChargingLogsController(IOrder_ChargesService chargesService, IChargeLogService chargeLogService)
        {
            _chargesService = chargesService;
            _chargeLogService = chargeLogService;
        }


        [HttpPost]
        public async Task<IActionResult> QueryFees(OrderChangeLogDto dto)
        {
            return Ok(await _chargesService.GetOrderChanges(dto.SystemNoList));
        }


        [HttpPost]
        public async Task<IActionResult> RetryList(OrderChangeLogDto order)
        {
            var data = await _chargeLogService.RetryList(order.SystemNoList);
            return Ok(data);
        }
    }
}
