using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using XYY.Core.Standard.Mvc;
using XYY.Service.Standard.Finance.Charging.CustomerOrderFee;
using XYY.Service.Standard.Finance.Charging.CustomerSupplement;
using XYY.Service.Standard.Finance.Charging.Express;
namespace XYY.Api.Finance.Charges.Controllers
{
    /// <summary>
    /// 补款操作
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class CustomerDeductionController : ApiControllerBase
    {

        ICustomerDeductionService _customerSupplementService;

        public CustomerDeductionController(ICustomerDeductionService customerSupplementService)
        {
            _customerSupplementService = customerSupplementService;
        }

        public async Task<IActionResult> Deduction(List<ExpressFeechargesModel> list)
        {
            var jsonModel = await _customerSupplementService.Charges(list);
            return Ok(jsonModel.error ?? jsonModel.message);
        }

    }
}
