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.CustomerSupplement;
using XYY.Service.Standard.Finance.Charging.Express;

namespace XYY.Api.Finance.Charges.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class CustomerSupplementController : ApiControllerBase
    {
        ICustomerSupplementService _customerSupplementService;

        public CustomerSupplementController(ICustomerSupplementService customerSupplementService)
        {
            _customerSupplementService = customerSupplementService;
        }

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

    }
}
