diff --git a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs index 9dce7891..0f42c6d3 100644 --- a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs +++ b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs @@ -967,11 +967,11 @@ namespace BBWY.Server.Business var response = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime()); if (response.Json == null) response.Json = JObject.Parse(response.Body); - var colorProperty = response.Json["jingdong_category_read_findAttrsByCategoryIdUnlimitCate_responce"]["findattrsbycategoryidunlimitcate_result"].FirstOrDefault(j => j.Value("name") == "颜色"); + var colorProperty = response.Json["jingdong_category_read_findAttrsByCategoryIdUnlimitCate_responce"]["findattrsbycategoryidunlimitcate_result"].FirstOrDefault(j => j["attrValueList"] != null && j["attrValueList"].Count() > 0); if (colorProperty == null) { RollBackWhenStartPromotionError(request.AppKey, request.AppSecret, request.AppToken, giftSkuIdList, request.MainProductSpu, request.FullTitle, brandName, haveGiftTemplateSku); - throw new BusinessException("获取销售属性-缺少颜色属性"); + throw new BusinessException("缺少销售属性"); } colorSaleAttrs = colorProperty["attrValueList"].ToList(); }