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.
37 lines
1.0 KiB
37 lines
1.0 KiB
3 years ago
|
using BBWY.Server.Business;
|
||
|
using Microsoft.AspNetCore.Http;
|
||
|
using Microsoft.AspNetCore.Mvc;
|
||
|
|
||
|
namespace BBWY.Server.API.Controllers
|
||
|
{
|
||
|
|
||
|
public class OrderSyncController : BaseApiController
|
||
|
{
|
||
|
private OrderSyncBusiness orderSyncBusiness;
|
||
|
public OrderSyncController(IHttpContextAccessor httpContextAccessor, OrderSyncBusiness orderSyncBusiness) : base(httpContextAccessor)
|
||
|
{
|
||
|
this.orderSyncBusiness = orderSyncBusiness;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 同步所有店铺的订单
|
||
|
/// </summary>
|
||
|
[HttpPost]
|
||
|
public void SyncAllShopOrder()
|
||
|
{
|
||
|
orderSyncBusiness.SyncAllShopOrder();
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 订单同步
|
||
|
/// </summary>
|
||
|
/// <param name="shopId"></param>
|
||
|
/// <param name="orderId"></param>
|
||
|
[HttpPost("{shopId}/{orderId}")]
|
||
|
public void SyncOrder([FromRoute] long shopId, [FromRoute] string orderId)
|
||
|
{
|
||
|
orderSyncBusiness.SyncOrder(shopId, orderId, null, null);
|
||
|
}
|
||
|
}
|
||
|
}
|