using BBWY.Server.Business; using BBWY.Server.Model.Dto; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; namespace BBWY.Server.API.Controllers { public class OrderEstimateCostSyncController : BaseApiController { private OrderEstimateCostSyncBusiness orderEstimateCostSyncBusiness; public OrderEstimateCostSyncController(IHttpContextAccessor httpContextAccessor, OrderEstimateCostSyncBusiness orderEstimateCostSyncBusiness) : base(httpContextAccessor) { this.orderEstimateCostSyncBusiness = orderEstimateCostSyncBusiness; } /// /// 同步所有店铺的SKU最近成本 /// [HttpPost] public void SyncAllShopOrderSkuRecentCost() { orderEstimateCostSyncBusiness.SyncAllShopOrderSkuRecentCost(); } /// /// 同步指定条件的SKU最近成本 /// /// [HttpPost] public void SyncOrderSkuRecentCost([FromBody] SkuRecentCostRequest request) { orderEstimateCostSyncBusiness.SyncOrderSkuRecentCost(request); } /// /// 为所有店铺没有成本的订单预估成本和毛利 /// [HttpPost] public void EstimateCostForAllShopNoCostOrder() { orderEstimateCostSyncBusiness.EstimateCostForAllShopNoCostOrder(); } /// /// 按指定条件预估成本和毛利 /// /// [HttpPost] public void EstimateCostForNoCostOrder([FromBody] SkuRecentCostRequest request) { orderEstimateCostSyncBusiness.EstimateCostForNoCostOrder(request); } } }