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.
44 lines
1.3 KiB
44 lines
1.3 KiB
using BBWYB.Server.Business;
|
|
using BBWYB.Server.Business.Sync;
|
|
using BBWYB.Server.Model;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace BBWYB.Server.API.Controllers
|
|
{
|
|
public class ProductSyncController : BaseApiController
|
|
{
|
|
private ProductSyncBusiness productSyncBusiness;
|
|
public ProductSyncController(IHttpContextAccessor httpContextAccessor, ProductSyncBusiness productSyncBusiness) : base(httpContextAccessor)
|
|
{
|
|
this.productSyncBusiness = productSyncBusiness;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 全店同步产品
|
|
/// </summary>
|
|
[HttpPost]
|
|
public void SyncAllShopAllProduct()
|
|
{
|
|
productSyncBusiness.SyncAllShopAllProduct();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 同步所有店铺最近变化产品
|
|
/// </summary>
|
|
[HttpPost]
|
|
public void SyncAllShopUpdateProduct()
|
|
{
|
|
productSyncBusiness.SyncAllShopUpdateProduct();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 同步指定店铺最近变化产品
|
|
/// </summary>
|
|
/// <param name="shopId"></param>
|
|
[HttpPost("{shopId}")]
|
|
public void SyncOneShopUpdateProduct([FromRoute] long shopId)
|
|
{
|
|
productSyncBusiness.SyncOneShopUpdateProduct(shopId);
|
|
}
|
|
}
|
|
}
|
|
|