diff --git a/BBWY.Server.API/Controllers/ServiceOrderSyncController.cs b/BBWY.Server.API/Controllers/ServiceOrderSyncController.cs index 2749824b..8b668f16 100644 --- a/BBWY.Server.API/Controllers/ServiceOrderSyncController.cs +++ b/BBWY.Server.API/Controllers/ServiceOrderSyncController.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Http; +using BBWY.Server.Business.Sync; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; namespace BBWY.Server.API.Controllers @@ -6,8 +7,11 @@ namespace BBWY.Server.API.Controllers public class ServiceOrderSyncController : BaseApiController { - public ServiceOrderSyncController(IHttpContextAccessor httpContextAccessor) : base(httpContextAccessor) + private JDServiceOrderSyncBusiness jdServiceOrderSyncBusiness; + + public ServiceOrderSyncController(JDServiceOrderSyncBusiness jdServiceOrderSyncBusiness, IHttpContextAccessor httpContextAccessor) : base(httpContextAccessor) { + this.jdServiceOrderSyncBusiness = jdServiceOrderSyncBusiness; } [Consumes("application/x-www-form-urlencoded")] @@ -16,5 +20,44 @@ namespace BBWY.Server.API.Controllers { } + + /// + /// 指定服务单同步 + /// + /// + /// + [HttpPost("{shopId}/{serviceId}")] + public void SyncServiceOrder([FromRoute] long shopId, [FromRoute] string serviceId) + { + jdServiceOrderSyncBusiness.SyncServiceOrder(shopId, serviceId); + } + + /// + /// 全店服务单同步 + /// + [HttpPost] + public void SyncServiceOrder() + { + jdServiceOrderSyncBusiness.SyncServiceOrder(); + } + + /// + /// 指定店铺订阅快递100 + /// + /// + [HttpPost("{shopId}")] + public void SubscribeKuaiDi100([FromRoute] long shopId) + { + jdServiceOrderSyncBusiness.SubscribeKuaiDi100(shopId); + } + + /// + /// 全店订阅快递100 + /// + [HttpPost] + public void SubscribeKuaiDi100() + { + jdServiceOrderSyncBusiness.SubscribeKuaiDi100(); + } } }