|
|
|
using BBWY.Server.Business.Sync;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
|
|
|
|
namespace BBWY.Server.API.Controllers
|
|
|
|
{
|
|
|
|
|
|
|
|
public class ServiceOrderSyncController : BaseApiController
|
|
|
|
{
|
|
|
|
private JDServiceOrderSyncBusiness jdServiceOrderSyncBusiness;
|
|
|
|
|
|
|
|
public ServiceOrderSyncController(JDServiceOrderSyncBusiness jdServiceOrderSyncBusiness, IHttpContextAccessor httpContextAccessor) : base(httpContextAccessor)
|
|
|
|
{
|
|
|
|
this.jdServiceOrderSyncBusiness = jdServiceOrderSyncBusiness;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Consumes("application/x-www-form-urlencoded")]
|
|
|
|
[HttpPost]
|
|
|
|
public void ReceiveKuaiDi100Push([FromForm] string sign, [FromForm] string param)
|
|
|
|
{
|
|
|
|
jdServiceOrderSyncBusiness.ReceiveKuaiDi100Push(param);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 指定服务单同步
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="shopId"></param>
|
|
|
|
/// <param name="serviceId"></param>
|
|
|
|
[HttpPost("{shopId}/{serviceId}")]
|
|
|
|
public void SyncServiceOrder([FromRoute] long shopId, [FromRoute] string serviceId)
|
|
|
|
{
|
|
|
|
jdServiceOrderSyncBusiness.SyncServiceOrder(shopId, serviceId);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 指定店铺同步
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="shopId"></param>
|
|
|
|
[HttpPost("{shopId}")]
|
|
|
|
public void SyncServiceOrder([FromRoute] long shopId)
|
|
|
|
{
|
|
|
|
jdServiceOrderSyncBusiness.SyncServiceOrder(shopId, string.Empty);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 全店服务单同步
|
|
|
|
/// </summary>
|
|
|
|
[HttpPost]
|
|
|
|
public void SyncServiceOrder()
|
|
|
|
{
|
|
|
|
jdServiceOrderSyncBusiness.SyncServiceOrder();
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 指定店铺订阅快递100
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="shopId"></param>
|
|
|
|
[HttpPost("{shopId}")]
|
|
|
|
public void SubscribeKuaiDi100([FromRoute] long shopId)
|
|
|
|
{
|
|
|
|
jdServiceOrderSyncBusiness.SubscribeKuaiDi100(shopId);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 全店订阅快递100
|
|
|
|
/// </summary>
|
|
|
|
[HttpPost]
|
|
|
|
public void SubscribeKuaiDi100()
|
|
|
|
{
|
|
|
|
jdServiceOrderSyncBusiness.SubscribeKuaiDi100();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|