|
|
@ -265,65 +265,65 @@ namespace BBWY.Server.Business |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
foreach (var orderToken in orderJtokens) |
|
|
|
{ |
|
|
|
var order = new OrderResponse() |
|
|
|
{ |
|
|
|
Id = orderToken.Value<string>("orderId"), |
|
|
|
BuyerAccount = orderToken.Value<string>("pin"), |
|
|
|
BuyerRemark = orderToken.Value<string>("orderRemark"), |
|
|
|
Consignee = new ConsigneeResponse() |
|
|
|
{ |
|
|
|
Address = orderToken["consigneeInfo"].Value<string>("fullAddress"), |
|
|
|
City = orderToken["consigneeInfo"].Value<string>("city"), |
|
|
|
Province = orderToken["consigneeInfo"].Value<string>("province"), |
|
|
|
County = orderToken["consigneeInfo"].Value<string>("county"), |
|
|
|
Town = orderToken["consigneeInfo"].Value<string>("town"), |
|
|
|
ContactName = orderToken["consigneeInfo"].Value<string>("fullname"), |
|
|
|
Mobile = orderToken["consigneeInfo"].Value<string>("mobile"), |
|
|
|
TelePhone = orderToken["consigneeInfo"].Value<string>("telephone") |
|
|
|
}, |
|
|
|
FreightPrice = orderToken.Value<decimal>("freightPrice"), |
|
|
|
OrderEndTime = orderToken.Value<DateTime?>("orderEndTime"), |
|
|
|
OrderStartTime = orderToken.Value<DateTime>("orderStartTime"), |
|
|
|
OrderPayment = orderToken.Value<decimal>("orderPayment"), |
|
|
|
OrderSellerPrice = orderToken.Value<decimal>("orderSellerPrice"), |
|
|
|
OrderTotalPrice = orderToken.Value<decimal>("orderTotalPrice"), |
|
|
|
OrderType = (Enums.OrderType)orderToken.Value<int>("orderType"), |
|
|
|
OrderStateText = orderToken.Value<string>("orderStateRemark"), |
|
|
|
Platform = Enums.Platform.京东, |
|
|
|
//Sh = orderToken.Value<string>("venderId"),
|
|
|
|
VenderRemark = orderToken.Value<string>("venderRemark"), |
|
|
|
WaybillNo = orderToken.Value<string>("waybill"), |
|
|
|
StoreOrder = orderToken.Value<string>("storeOrder"), |
|
|
|
ItemList = ((JArray)orderToken["itemInfoList"]).Select(skuToken => new OrderSkuResponse() |
|
|
|
{ |
|
|
|
Id = skuToken.Value<string>("skuId"), |
|
|
|
ItemTotal = skuToken.Value<int>("itemTotal"), |
|
|
|
Price = skuToken.Value<decimal>("jdPrice"), |
|
|
|
ProductId = skuToken.Value<string>("wareId"), |
|
|
|
Title = skuToken.Value<string>("skuName").SimplifySkuName(), |
|
|
|
ProductNo = skuToken.Value<string>("productNo") |
|
|
|
}).ToList() |
|
|
|
}; |
|
|
|
|
|
|
|
if (order.StoreOrder == "京仓订单") |
|
|
|
order.StorageType = Enums.StorageType.京仓; |
|
|
|
else if (order.StoreOrder == "云仓订单") |
|
|
|
order.StorageType = Enums.StorageType.云仓; |
|
|
|
|
|
|
|
var payType = orderToken.Value<string>("payType"); |
|
|
|
if (payType.Contains("-")) |
|
|
|
order.PayType = (Enums.PayType)Convert.ToInt32(payType.Substring(0, 1)); |
|
|
|
|
|
|
|
//翻译订单状态
|
|
|
|
//未付款 NOT_PAY
|
|
|
|
#region
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
//response.Items.Add(order);
|
|
|
|
} |
|
|
|
//foreach (var orderToken in orderJtokens)
|
|
|
|
//{
|
|
|
|
// var order = new OrderResponse()
|
|
|
|
// {
|
|
|
|
// Id = orderToken.Value<string>("orderId"),
|
|
|
|
// BuyerAccount = orderToken.Value<string>("pin"),
|
|
|
|
// BuyerRemark = orderToken.Value<string>("orderRemark"),
|
|
|
|
// Consignee = new ConsigneeResponse()
|
|
|
|
// {
|
|
|
|
// Address = orderToken["consigneeInfo"].Value<string>("fullAddress"),
|
|
|
|
// City = orderToken["consigneeInfo"].Value<string>("city"),
|
|
|
|
// Province = orderToken["consigneeInfo"].Value<string>("province"),
|
|
|
|
// County = orderToken["consigneeInfo"].Value<string>("county"),
|
|
|
|
// Town = orderToken["consigneeInfo"].Value<string>("town"),
|
|
|
|
// ContactName = orderToken["consigneeInfo"].Value<string>("fullname"),
|
|
|
|
// Mobile = orderToken["consigneeInfo"].Value<string>("mobile"),
|
|
|
|
// TelePhone = orderToken["consigneeInfo"].Value<string>("telephone")
|
|
|
|
// },
|
|
|
|
// FreightPrice = orderToken.Value<decimal>("freightPrice"),
|
|
|
|
// OrderEndTime = orderToken.Value<DateTime?>("orderEndTime"),
|
|
|
|
// OrderStartTime = orderToken.Value<DateTime>("orderStartTime"),
|
|
|
|
// OrderPayment = orderToken.Value<decimal>("orderPayment"),
|
|
|
|
// OrderSellerPrice = orderToken.Value<decimal>("orderSellerPrice"),
|
|
|
|
// OrderTotalPrice = orderToken.Value<decimal>("orderTotalPrice"),
|
|
|
|
// OrderType = (Enums.OrderType)orderToken.Value<int>("orderType"),
|
|
|
|
// OrderStateText = orderToken.Value<string>("orderStateRemark"),
|
|
|
|
// Platform = Enums.Platform.京东,
|
|
|
|
// //Sh = orderToken.Value<string>("venderId"),
|
|
|
|
// VenderRemark = orderToken.Value<string>("venderRemark"),
|
|
|
|
// WaybillNo = orderToken.Value<string>("waybill"),
|
|
|
|
// StoreOrder = orderToken.Value<string>("storeOrder"),
|
|
|
|
// ItemList = ((JArray)orderToken["itemInfoList"]).Select(skuToken => new OrderSkuResponse()
|
|
|
|
// {
|
|
|
|
// Id = skuToken.Value<string>("skuId"),
|
|
|
|
// ItemTotal = skuToken.Value<int>("itemTotal"),
|
|
|
|
// Price = skuToken.Value<decimal>("jdPrice"),
|
|
|
|
// ProductId = skuToken.Value<string>("wareId"),
|
|
|
|
// Title = skuToken.Value<string>("skuName").SimplifySkuName(),
|
|
|
|
// ProductNo = skuToken.Value<string>("productNo")
|
|
|
|
// }).ToList()
|
|
|
|
// };
|
|
|
|
|
|
|
|
// if (order.StoreOrder == "京仓订单")
|
|
|
|
// order.StorageType = Enums.StorageType.京仓;
|
|
|
|
// else if (order.StoreOrder == "云仓订单")
|
|
|
|
// order.StorageType = Enums.StorageType.云仓;
|
|
|
|
|
|
|
|
// var payType = orderToken.Value<string>("payType");
|
|
|
|
// if (payType.Contains("-"))
|
|
|
|
// order.PayType = (Enums.PayType)Convert.ToInt32(payType.Substring(0, 1));
|
|
|
|
|
|
|
|
// //翻译订单状态
|
|
|
|
// //未付款 NOT_PAY
|
|
|
|
// #region
|
|
|
|
|
|
|
|
// #endregion
|
|
|
|
|
|
|
|
// //response.Items.Add(order);
|
|
|
|
//}
|
|
|
|
return orderJtokens; |
|
|
|
} |
|
|
|
|
|
|
@ -437,5 +437,38 @@ namespace BBWY.Server.Business |
|
|
|
throw new BusinessException($"{response.Json["jingdong_pop_order_shipment_responce"]["sopjosshipment_result"].Value<string>("chineseErrCode")}"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public override JArray GetRefundList(SearchRefundPlatformOrderRequest searchRefundPlatformOrderRequest) |
|
|
|
{ |
|
|
|
var jdClient = GetJdClient(searchRefundPlatformOrderRequest.AppKey, searchRefundPlatformOrderRequest.AppSecret); |
|
|
|
|
|
|
|
|
|
|
|
AscServiceAndRefundViewRequest req = new AscServiceAndRefundViewRequest(); |
|
|
|
|
|
|
|
//req.orderId = ;
|
|
|
|
|
|
|
|
//req.applyTimeBegin = ;
|
|
|
|
|
|
|
|
//req.applyTimeEnd = ;
|
|
|
|
if (!string.IsNullOrEmpty(searchRefundPlatformOrderRequest.OrderId)) |
|
|
|
req.orderId = long.Parse(searchRefundPlatformOrderRequest.OrderId); |
|
|
|
req.approveTimeBegin = searchRefundPlatformOrderRequest.StartDate; |
|
|
|
req.approveTimeEnd = searchRefundPlatformOrderRequest.EndDate; |
|
|
|
req.pageNumber = searchRefundPlatformOrderRequest.PageIndex.ToString(); |
|
|
|
req.pageSize = searchRefundPlatformOrderRequest.PageSize.ToString(); |
|
|
|
|
|
|
|
var response = jdClient.Execute(req, searchRefundPlatformOrderRequest.AppToken, DateTime.Now.ToLocalTime()); |
|
|
|
if (searchRefundPlatformOrderRequest.SaveResponseLog) |
|
|
|
logger.Info($"获取退款订单 Request:{JsonConvert.SerializeObject(searchRefundPlatformOrderRequest)} Response:{JsonConvert.SerializeObject(response)}"); |
|
|
|
|
|
|
|
if (response.IsError) |
|
|
|
throw new BusinessException($"获取退款订单失败 {(string.IsNullOrEmpty(response.ErrorMsg) ? response.ErrMsg : response.ErrorMsg)}"); |
|
|
|
|
|
|
|
if (response.Json == null) |
|
|
|
response.Json = JsonConvert.DeserializeObject<JObject>(response.Body); |
|
|
|
|
|
|
|
//return base.GetRefundList(searchRefundPlatformOrderRequest);
|
|
|
|
return (JArray)response.Json["jingdong_asc_serviceAndRefund_view_responce"]["data"]; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|