From 4c3ff4aa0db8dc77a501776c8ad95d43d3525aae Mon Sep 17 00:00:00 2001 From: shanji <18996038927@163.com> Date: Tue, 31 May 2022 18:03:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=20=E5=87=BA=E5=BA=93=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PurchaseOrder/PurchaseOrderBusiness.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/BBWY.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs b/BBWY.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs index 585e1e8b..04363d45 100644 --- a/BBWY.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs +++ b/BBWY.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs @@ -455,6 +455,7 @@ namespace BBWY.Server.Business string logisticsCompanyListInfo = string.Empty; string logisticsCompanyId = string.Empty; string orderId = string.Empty; + OutStockRequest outStockRequest = null; try { #region 查询代发信息 @@ -515,7 +516,7 @@ namespace BBWY.Server.Business #region 店铺平台订单出库 currentProgress = "店铺平台订单出库"; - orderBusiness.OutStock(new OutStockRequest() + outStockRequest = new OutStockRequest() { AppKey = shop.AppKey, AppSecret = shop.AppSecret, @@ -523,15 +524,17 @@ namespace BBWY.Server.Business OrderId = orderDropshipping.OrderId, Platform = shop.Platform, WayBillNo = wayBillNoResponse.WayBillNo, - LogisticsId = logisticsCompanyId //物流公司Id - }); + LogisticsId = logisticsCompanyId, //物流公司Id + SaveResponseLog = true + }; + orderBusiness.OutStock(outStockRequest); #endregion - logger.Info($"DeliveryCallback 回调平台{callbackPlatform},订单号{orderId},采购单号{purchaseOrderId},执行进度[{currentProgress}],采购单物流信息:{wayBillNoResponseInfo},店铺平台物流公司列表:{logisticsCompanyListInfo},翻译后的物流公司Id:{logisticsCompanyId}"); + logger.Info($"DeliveryCallback 回调平台{callbackPlatform},订单号{orderId},采购单号{purchaseOrderId},执行进度[{currentProgress}],采购单物流信息:{wayBillNoResponseInfo},店铺平台物流公司列表:{logisticsCompanyListInfo},翻译后的物流公司Id:{logisticsCompanyId},出库请求:{(outStockRequest != null ? JsonConvert.SerializeObject(outStockRequest) : null)}"); } catch (Exception ex) { - logger.Error(ex, $"DeliveryCallback 回调平台{callbackPlatform},订单号{orderId},采购单号{purchaseOrderId},执行进度[{currentProgress}],采购单物流信息:{wayBillNoResponseInfo},店铺平台物流公司列表:{logisticsCompanyListInfo},翻译后的物流公司Id:{logisticsCompanyId}"); + logger.Error(ex, $"DeliveryCallback 回调平台{callbackPlatform},订单号{orderId},采购单号{purchaseOrderId},执行进度[{currentProgress}],采购单物流信息:{wayBillNoResponseInfo},店铺平台物流公司列表:{logisticsCompanyListInfo},翻译后的物流公司Id:{logisticsCompanyId},出库请求:{(outStockRequest != null ? JsonConvert.SerializeObject(outStockRequest) : null)}"); } } From 50b06de0c39608e5c0b2f96db665ee405a637589 Mon Sep 17 00:00:00 2001 From: shanji <18996038927@163.com> Date: Tue, 31 May 2022 18:07:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=87=BA=E5=BA=93=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BBWY.Server.Business/PlatformSDK/JDBusiness.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs index 56ea584a..60fa167b 100644 --- a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs +++ b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs @@ -424,7 +424,7 @@ namespace BBWY.Server.Business var response = jdClient.Execute(req, outStockRequest.AppToken, DateTime.Now.ToLocalTime()); if (outStockRequest.SaveResponseLog) - logger.Info($"出库发货 {response.Body}"); + logger.Info($"出库发货 Request:{JsonConvert.SerializeObject(outStockRequest)} Response:{JsonConvert.SerializeObject(response)}"); if (response.IsError) throw new BusinessException($"{response.RealErrorMsg}");