From b57526cb43b5a252143becbc55f7ecea18b6a7a2 Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Sun, 29 Oct 2023 21:41:40 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=BB=B6=E9=95=BF=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E8=B5=A0=E5=93=81=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EvaluationAssistant/EvaluationAssistantBusiness.cs | 2 +- BBWY.Server.Business/PlatformSDK/JDBusiness.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs b/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs index 68c206cb..ae6df7db 100644 --- a/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs +++ b/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs @@ -610,7 +610,7 @@ namespace BBWY.Server.Business MainProductSkuInStore = mainProductSkuInStore, OuterId = dbPromotionTask.OuterId - }, GetYunDingRequestHeader(), HttpMethod.Post, timeOutSeconds: 700); + }, GetYunDingRequestHeader(), HttpMethod.Post, timeOutSeconds: 800); if (httpApiResult.StatusCode != System.Net.HttpStatusCode.OK) throw new BusinessException(httpApiResult.Content); diff --git a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs index ea264615..3fa8259e 100644 --- a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs +++ b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs @@ -939,7 +939,7 @@ namespace BBWY.Server.Business throw new BusinessException($"获取主商品品牌失败-{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}"); if (res.Json == null) res.Json = JObject.Parse(res.Body); - brandName = res.Json["jingdong_ware_read_findWareById_responce"]["ware"].Value("brandName"); + brandName = res.Json["jingdong_ware_read_findWareById_responce"]["ware"].Value("brandName"); } #endregion @@ -1187,7 +1187,7 @@ namespace BBWY.Server.Business #region 查询上架的赠品 stepText = "查询上架的赠品SKU"; - Thread.Sleep(60 * 1000); + Thread.Sleep(90 * 1000); searchProductSkuRequest.Sku = string.Join(",", giftSkuIdList); searchProductSkuRequest.CheckStep = "上架的赠品"; try From 39a6f5fc4d3c95a4fd9ea429d455fcb3e2d68e9e Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Sun, 29 Oct 2023 21:43:50 +0800 Subject: [PATCH 2/3] 1 --- 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 3fa8259e..2ad5f268 100644 --- a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs +++ b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs @@ -1187,7 +1187,7 @@ namespace BBWY.Server.Business #region 查询上架的赠品 stepText = "查询上架的赠品SKU"; - Thread.Sleep(90 * 1000); + Thread.Sleep(60 * 1000); searchProductSkuRequest.Sku = string.Join(",", giftSkuIdList); searchProductSkuRequest.CheckStep = "上架的赠品"; try From 779ce9afe5e25a229e632fef3f087d5948355305 Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Tue, 31 Oct 2023 10:11:24 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A4=84=E7=90=86=E4=B8=8A=E6=9E=B6?= =?UTF-8?q?=E4=B9=8B=E5=90=8E=E6=B2=A1=E6=9C=89skuId=E7=9A=84=E6=83=85?= =?UTF-8?q?=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PlatformSDK/JDBusiness.cs | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs index 2ad5f268..a4f05ae2 100644 --- a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs +++ b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs @@ -1110,6 +1110,33 @@ namespace BBWY.Server.Business stepText = "获取上架skuId"; var newSkuIdList = res.Json["jingdong_sku_write_updateSkus_responce"]["skuList"].ToList().Select(x => x.Value("skuId")).ToList(); + + #region 处理上架之后没有skuId的情况 + if (newSkuIdList.Any(s => string.IsNullOrEmpty(s))) + { + newSkuIdList.Clear(); + Thread.Sleep(30 * 1000); + var _mainProductSkuList = GetProductSkuList(new SearchProductSkuRequest() + { + AppKey = request.AppKey, + AppSecret = request.AppSecret, + AppToken = request.AppToken, + Platform = Enums.Platform.京东, + Spu = request.MainProductSpu + }); + foreach (var ps in _mainProductSkuList) + { + if (request.GiftTemplateSkuList.Any(x => x.Title == ps.Title)) + { + //此sku是赠品sku + newSkuIdList.Add(ps.Id); + } + } + if (newSkuIdList.Count() == 0) + throw new BusinessException("未能从sku列表接口正常获取新上架sku"); + } + #endregion + giftSkuIdList.AddRange(newSkuIdList); stepText = "获取上架sku";