|
|
|
using BBWY.Client.Models;
|
|
|
|
using BBWY.Common.Http;
|
|
|
|
using BBWY.Common.Models;
|
|
|
|
using System;
|
|
|
|
using System.Net.Http;
|
|
|
|
|
|
|
|
namespace BBWY.Client.APIServices
|
|
|
|
{
|
|
|
|
public class AfterOrderService : BaseApiService, IDenpendency
|
|
|
|
{
|
|
|
|
public AfterOrderService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public ApiResponse<AfterSaleOrderListResponse> GetAfterSaleOrderList(long shopId,
|
|
|
|
string orderId,
|
|
|
|
DateTime? startDate,
|
|
|
|
DateTime? endDate,
|
|
|
|
string spu,
|
|
|
|
string sku,
|
|
|
|
string serviceId,
|
|
|
|
bool onlyUnhandle,
|
|
|
|
int pageIndex,
|
|
|
|
int pageSize)
|
|
|
|
{
|
|
|
|
return SendRequest<AfterSaleOrderListResponse>(globalContext.BBYWApiHost, "/Api/AfterSaleOrder/GetAfterSaleOrderList", new
|
|
|
|
{
|
|
|
|
shopId,
|
|
|
|
orderId,
|
|
|
|
startDate,
|
|
|
|
endDate,
|
|
|
|
spu,
|
|
|
|
sku,
|
|
|
|
serviceId,
|
|
|
|
onlyUnhandle,
|
|
|
|
pageIndex,
|
|
|
|
pageSize
|
|
|
|
}, null, HttpMethod.Post);
|
|
|
|
}
|
|
|
|
|
|
|
|
public ApiResponse<AfterSaleOrderResponse> GetAfterSaleOrderById(long afterSaleOrderId)
|
|
|
|
{
|
|
|
|
return SendRequest<AfterSaleOrderResponse>(globalContext.BBYWApiHost, $"api/AfterSaleOrder/GetAfterSaleOrderById/{afterSaleOrderId}", null, null, HttpMethod.Get);
|
|
|
|
}
|
|
|
|
|
|
|
|
public ApiResponse<object> EditAfterSaleOrder(long afterSaleOrderId,
|
|
|
|
string orderId,
|
|
|
|
ProductResult productResult,
|
|
|
|
ServiceResult serviceResult,
|
|
|
|
ProductHealth productHealth,
|
|
|
|
decimal reissueAfterSaleAmount,
|
|
|
|
decimal reissueFreight,
|
|
|
|
decimal reissueProductAmount,
|
|
|
|
decimal sdRefundFreight)
|
|
|
|
{
|
|
|
|
return SendRequest<object>(globalContext.BBYWApiHost, "Api/AfterSaleOrder/EditAfterSaleOrder", new
|
|
|
|
{
|
|
|
|
Id = afterSaleOrderId,
|
|
|
|
orderId,
|
|
|
|
serviceResult,
|
|
|
|
productResult,
|
|
|
|
productHealth,
|
|
|
|
reissueAfterSaleAmount,
|
|
|
|
reissueFreight,
|
|
|
|
reissueProductAmount,
|
|
|
|
sdRefundFreight
|
|
|
|
}, null, HttpMethod.Post);
|
|
|
|
}
|
|
|
|
|
|
|
|
public ApiResponse<object> EditAfterSaleOrderRefundPurchaseAmount(long afterSaleOrderId,
|
|
|
|
string orderId,
|
|
|
|
decimal refundPurchaseAmount,
|
|
|
|
string refundMerchantOrderNo,
|
|
|
|
string refundAlipayOrderNo)
|
|
|
|
{
|
|
|
|
return SendRequest<object>(globalContext.BBYWApiHost, "Api/AfterSaleOrder/EditAfterSaleOrderRefundPurchaseAmount", new
|
|
|
|
{
|
|
|
|
Id = afterSaleOrderId,
|
|
|
|
orderId,
|
|
|
|
refundPurchaseAmount,
|
|
|
|
refundMerchantOrderNo,
|
|
|
|
refundAlipayOrderNo
|
|
|
|
}, null, HttpMethod.Post);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|