|
@ -14,7 +14,6 @@ using System.Collections.Generic; |
|
|
using System.Linq; |
|
|
using System.Linq; |
|
|
using System.Text; |
|
|
using System.Text; |
|
|
using System.Threading; |
|
|
using System.Threading; |
|
|
using System.Threading.Tasks; |
|
|
|
|
|
|
|
|
|
|
|
namespace BBWY.Server.Business |
|
|
namespace BBWY.Server.Business |
|
|
{ |
|
|
{ |
|
@ -905,29 +904,6 @@ namespace BBWY.Server.Business |
|
|
if (haveGiftTemplateSku) |
|
|
if (haveGiftTemplateSku) |
|
|
{ |
|
|
{ |
|
|
#region 上架赠品
|
|
|
#region 上架赠品
|
|
|
//string barCode = string.Empty, categoryId = string.Empty;
|
|
|
|
|
|
//IList<JToken> 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<string>("barCode");
|
|
|
|
|
|
// categoryId = mainSkuList[0].Source.Value<string>("categoryId");
|
|
|
|
|
|
// multiCateProps = mainSkuList[0].Source["multiCateProps"] != null ? mainSkuList[0].Source["multiCateProps"].ToList() : null;
|
|
|
|
|
|
//}
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 获取销售属性
|
|
|
#region 获取销售属性
|
|
|
stepText = "获取销售属性"; |
|
|
stepText = "获取销售属性"; |
|
@ -942,7 +918,10 @@ namespace BBWY.Server.Business |
|
|
response.Json = JObject.Parse(response.Body); |
|
|
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.Value<string>("name") == "颜色"); |
|
|
if (colorProperty == null) |
|
|
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(); |
|
|
colorSaleAttrs = colorProperty["attrValueList"].ToList(); |
|
|
} |
|
|
} |
|
|
#endregion
|
|
|
#endregion
|
|
|