From 31cb2864c11e5c27b141f78e453f1c858ab73002 Mon Sep 17 00:00:00 2001 From: shanji <18996038927@163.com> Date: Tue, 7 Mar 2023 16:24:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=84=E4=BB=B7=E5=8A=A9=E6=89=8B=E5=BC=80?= =?UTF-8?q?=E5=A7=8B=E4=BB=BB=E5=8A=A1=E8=8E=B7=E5=8F=96=E9=94=80=E5=94=AE?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=A4=B1=E8=B4=A5=E6=94=AF=E6=8C=81=E5=9B=9E?= =?UTF-8?q?=E6=BB=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PlatformSDK/JDBusiness.cs | 27 +++---------------- 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs index 6753e8a9..8970cd32 100644 --- a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs +++ b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; -using System.Threading.Tasks; namespace BBWY.Server.Business { @@ -905,29 +904,6 @@ namespace BBWY.Server.Business if (haveGiftTemplateSku) { #region 上架赠品 - //string barCode = string.Empty, categoryId = string.Empty; - //IList multiCateProps = null; - - //#region 获取主商品sku信息 barCode,categoryId,multiCateProps - //{ - // stepText = "获取主商品sku信息"; - // var mainSkuList = GetProductSkuList(new SearchProductSkuRequest() - // { - // AppKey = request.AppKey, - // AppSecret = request.AppSecret, - // AppToken = request.AppToken, - // IsContainSource = true, - // Platform = request.Platform, - // Spu = request.MainProductSpu - // }); - // if (mainSkuList.Count() == 0) - // throw new BusinessException($"获取主商品sku信息-未查询到sku信息"); - - // barCode = mainSkuList[0].Source.Value("barCode"); - // categoryId = mainSkuList[0].Source.Value("categoryId"); - // multiCateProps = mainSkuList[0].Source["multiCateProps"] != null ? mainSkuList[0].Source["multiCateProps"].ToList() : null; - //} - //#endregion #region 获取销售属性 stepText = "获取销售属性"; @@ -942,7 +918,10 @@ namespace BBWY.Server.Business response.Json = JObject.Parse(response.Body); var colorProperty = response.Json["jingdong_category_read_findAttrsByCategoryIdUnlimitCate_responce"]["findattrsbycategoryidunlimitcate_result"].FirstOrDefault(j => j.Value("name") == "颜色"); if (colorProperty == null) + { + RollBackWhenStartPromotionError(request.AppKey, request.AppSecret, request.AppToken, giftSkuIdList, request.MainProductSpu, request.FullTitle, brandName, haveGiftTemplateSku); throw new BusinessException("获取销售属性-缺少颜色属性"); + } colorSaleAttrs = colorProperty["attrValueList"].ToList(); } #endregion