You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.8 KiB
56 lines
1.8 KiB
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;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 同步所有店铺的SKU最近成本
|
|
/// </summary>
|
|
[HttpPost]
|
|
public void SyncAllShopOrderSkuRecentCost()
|
|
{
|
|
orderEstimateCostSyncBusiness.SyncAllShopOrderSkuRecentCost();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 同步指定条件的SKU最近成本
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
[HttpPost]
|
|
public void SyncOrderSkuRecentCost([FromBody] SkuRecentCostRequest request)
|
|
{
|
|
orderEstimateCostSyncBusiness.SyncOrderSkuRecentCost(request);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 为所有店铺没有成本的订单预估成本和毛利
|
|
/// </summary>
|
|
[HttpPost]
|
|
public void EstimateCostForAllShopNoCostOrder()
|
|
{
|
|
orderEstimateCostSyncBusiness.EstimateCostForAllShopNoCostOrder();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 按指定条件预估成本和毛利
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
[HttpPost]
|
|
public void EstimateCostForNoCostOrder([FromBody] SkuRecentCostRequest request)
|
|
{
|
|
orderEstimateCostSyncBusiness.EstimateCostForNoCostOrder(request);
|
|
}
|
|
}
|
|
}
|
|
|