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)}"); } }