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