From cf71d993447390a34174534cac9b2063ea97221d Mon Sep 17 00:00:00 2001 From: shanji <18996038927@163.com> Date: Fri, 23 Feb 2024 16:05:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=84=E4=BB=B7=E5=8A=A9=E6=89=8B=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E4=BB=BB=E5=8A=A1=E6=B8=85=E7=A9=BA=E8=B5=A0=E5=93=81?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E5=8F=AA=E8=AE=B0=E5=BD=95=E4=BC=8A=E7=90=B3?= =?UTF-8?q?=E7=9A=84=E6=89=A7=E8=A1=8C=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EvaluationAssistantBusiness.cs | 9 +++++++++ BBWY.Server.Business/PlatformSDK/JDBusiness.cs | 18 +++--------------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs b/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs index 4c501838..bfae50d3 100644 --- a/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs +++ b/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs @@ -1166,6 +1166,15 @@ namespace BBWY.Server.Business Platform = Enums.Platform.京东, Items = giftSkuList }, null, HttpMethod.Post); + + if (shop.ShopId == "12899501") + { + nLogManager.GetLogger(loggerName).Info($"执行赠品库存清空,任务[{jobDoneTask}] 清空库存结果 {JsonConvert.SerializeObject(httpResult)}"); + } + } + else if (shop.ShopId == "12899501") + { + nLogManager.GetLogger(loggerName).Info($"执行赠品库存清空,任务[{jobDoneTask}]没有赠品"); } } #endregion diff --git a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs index 7d4698f9..81b25897 100644 --- a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs +++ b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs @@ -2072,18 +2072,6 @@ namespace BBWY.Server.Business public override void SetSkuStockNum(SetSkuStockNumRequest request) { - /* - foreach (var giftSkuId in giftSkuIdList) - { - var req = new StockWriteUpdateSkuStockRequest(); - req.skuId = long.Parse(giftSkuId); - req.stockNum = 9999; - req.storeId = 0; - var res = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime()); - if (res.IsError) - throw new BusinessException($"设置全国仓库存失败-{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}"); - } - */ var jdClient = GetJdClient(request.AppKey, request.AppSecret); foreach (var item in request.Items) @@ -2092,9 +2080,9 @@ namespace BBWY.Server.Business req.skuId = long.Parse(item.Sku); req.stockNum = item.StockNum; req.storeId = item.StoreId; - _ = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime()); - //if (res.IsError) - // throw new BusinessException($"设置全国仓库存失败-{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}"); + var res = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime()); + if (res.IsError) + throw new BusinessException($"设置全国仓库存失败-{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}"); } }