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.
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using SiNan.Business;
|
|
|
|
using SiNan.Model.Dto;
|
|
|
|
|
|
|
|
namespace SiNan.API.Controllers
|
|
|
|
{
|
|
|
|
|
|
|
|
public class ProductController : BaseApiController
|
|
|
|
{
|
|
|
|
private ProductBusiness productBusiness;
|
|
|
|
public ProductController(IHttpContextAccessor httpContextAccessor, ProductBusiness productBusiness) : base(httpContextAccessor)
|
|
|
|
{
|
|
|
|
this.productBusiness = productBusiness;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 设置SKU最大亏损,级联更新SPU最大亏损
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="request"></param>
|
|
|
|
[HttpPost]
|
|
|
|
public void SetMaxDeficitThreshold([FromBody] SetMaxDeficitThresholdRequest request)
|
|
|
|
{
|
|
|
|
productBusiness.SetMaxDeficitThreshold(request);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 获取产品列表
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="searchProductRequest"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
|
|
public ProductListResponse GetProductList([FromBody] SearchProductRequest searchProductRequest)
|
|
|
|
{
|
|
|
|
return productBusiness.GetProductList(searchProductRequest);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 获取sku列表
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="searchProductSkuRequest"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
|
|
public IList<ProductSkuResponse> GetProductSkuList([FromBody] SearchProductSkuRequest searchProductSkuRequest)
|
|
|
|
{
|
|
|
|
return productBusiness.GetProductSkuList(searchProductSkuRequest);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|