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.
40 lines
1.1 KiB
40 lines
1.1 KiB
using BBWY.Server.Business.Sync;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace BBWY.Server.API.Controllers
|
|
{
|
|
|
|
public class ProductSyncController : BaseApiController
|
|
{
|
|
private ProductSyncBusiness productSyncBusiness;
|
|
public ProductSyncController(IHttpContextAccessor httpContextAccessor, ProductSyncBusiness productSyncBusiness) : base(httpContextAccessor)
|
|
{
|
|
this.productSyncBusiness = productSyncBusiness;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 全店同步产品(前50)
|
|
/// </summary>
|
|
[HttpPost]
|
|
public void SyncAllShopProduct()
|
|
{
|
|
productSyncBusiness.SyncAllShopProduct();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 全店同步产品(全部产品)
|
|
/// </summary>
|
|
[HttpPost]
|
|
public void SyncAllShopAllProduct()
|
|
{
|
|
productSyncBusiness.SyncAllShopAllProduct();
|
|
}
|
|
|
|
[HttpPost("{shopId}")]
|
|
public void SyncOneShopProduct([FromRoute]long shopId)
|
|
{
|
|
productSyncBusiness.SyncOneShopProduct(shopId);
|
|
}
|
|
}
|
|
}
|
|
|