diff --git a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs index 344a7916..8b0123de 100644 --- a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs +++ b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs @@ -422,7 +422,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}"); 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)}"); } }