|
@ -673,6 +673,7 @@ namespace BBWY.Server.Business |
|
|
List<string> giftSkuIdList = new List<string>(); |
|
|
List<string> giftSkuIdList = new List<string>(); |
|
|
long promotionId = 0; |
|
|
long promotionId = 0; |
|
|
var brandName = string.Empty; |
|
|
var brandName = string.Empty; |
|
|
|
|
|
|
|
|
#region 获取主商品品牌
|
|
|
#region 获取主商品品牌
|
|
|
{ |
|
|
{ |
|
|
stepText = "获取主商品品牌"; |
|
|
stepText = "获取主商品品牌"; |
|
@ -709,6 +710,7 @@ namespace BBWY.Server.Business |
|
|
#region 上架赠品
|
|
|
#region 上架赠品
|
|
|
string barCode = string.Empty, categoryId = string.Empty; |
|
|
string barCode = string.Empty, categoryId = string.Empty; |
|
|
IList<JToken> multiCateProps = null; |
|
|
IList<JToken> multiCateProps = null; |
|
|
|
|
|
|
|
|
#region 获取主商品sku信息 barCode,categoryId,multiCateProps
|
|
|
#region 获取主商品sku信息 barCode,categoryId,multiCateProps
|
|
|
{ |
|
|
{ |
|
|
stepText = "获取主商品sku信息"; |
|
|
stepText = "获取主商品sku信息"; |
|
@ -903,22 +905,15 @@ namespace BBWY.Server.Business |
|
|
{ |
|
|
{ |
|
|
if (!string.IsNullOrEmpty(request.GiftTemplateSku)) |
|
|
if (!string.IsNullOrEmpty(request.GiftTemplateSku)) |
|
|
{ |
|
|
{ |
|
|
try |
|
|
DeleteSkuList(new DeleteSkuListRequest() |
|
|
{ |
|
|
|
|
|
foreach (var deleteSku in giftSkuIdList) |
|
|
|
|
|
{ |
|
|
|
|
|
DeleteSku(new DeleteSkuRequest() |
|
|
|
|
|
{ |
|
|
{ |
|
|
AppKey = request.AppKey, |
|
|
AppKey = request.AppKey, |
|
|
AppSecret = request.AppSecret, |
|
|
AppSecret = request.AppSecret, |
|
|
AppToken = request.AppToken, |
|
|
AppToken = request.AppToken, |
|
|
Platform = request.Platform, |
|
|
Platform = request.Platform, |
|
|
Sku = deleteSku |
|
|
SkuList = giftSkuIdList |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
catch { } |
|
|
|
|
|
} |
|
|
|
|
|
throw new BusinessException($"创建活动失败-{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}"); |
|
|
throw new BusinessException($"创建活动失败-{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -1001,19 +996,6 @@ namespace BBWY.Server.Business |
|
|
req.bindType = req.bindType.Substring(0, req.bindType.Length - 1); |
|
|
req.bindType = req.bindType.Substring(0, req.bindType.Length - 1); |
|
|
req.num = req.num.Substring(0, req.num.Length - 1); |
|
|
req.num = req.num.Substring(0, req.num.Length - 1); |
|
|
|
|
|
|
|
|
//req.skuIds = "";
|
|
|
|
|
|
|
|
|
|
|
|
//req.jdPrices = ;
|
|
|
|
|
|
|
|
|
|
|
|
//req.promoPrices = ;
|
|
|
|
|
|
|
|
|
|
|
|
//req.seq = ;
|
|
|
|
|
|
|
|
|
|
|
|
//req.num = ;
|
|
|
|
|
|
|
|
|
|
|
|
//req.bindType = ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var res = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime()); |
|
|
var res = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime()); |
|
|
if (res.IsError) |
|
|
if (res.IsError) |
|
|
throw new BusinessException($"添加活动sku失败-{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}"); |
|
|
throw new BusinessException($"添加活动sku失败-{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}"); |
|
@ -1029,22 +1011,15 @@ namespace BBWY.Server.Business |
|
|
{ |
|
|
{ |
|
|
if (!string.IsNullOrEmpty(request.GiftTemplateSku)) |
|
|
if (!string.IsNullOrEmpty(request.GiftTemplateSku)) |
|
|
{ |
|
|
{ |
|
|
try |
|
|
DeleteSkuList(new DeleteSkuListRequest() |
|
|
{ |
|
|
|
|
|
foreach (var deleteSku in giftSkuIdList) |
|
|
|
|
|
{ |
|
|
|
|
|
DeleteSku(new DeleteSkuRequest() |
|
|
|
|
|
{ |
|
|
{ |
|
|
AppKey = request.AppKey, |
|
|
AppKey = request.AppKey, |
|
|
AppSecret = request.AppSecret, |
|
|
AppSecret = request.AppSecret, |
|
|
AppToken = request.AppToken, |
|
|
AppToken = request.AppToken, |
|
|
Platform = request.Platform, |
|
|
Platform = request.Platform, |
|
|
Sku = deleteSku |
|
|
SkuList = giftSkuIdList |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
catch { } |
|
|
|
|
|
} |
|
|
|
|
|
throw new BusinessException($"创建活动失败-{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}"); |
|
|
throw new BusinessException($"创建活动失败-{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -1061,39 +1036,29 @@ namespace BBWY.Server.Business |
|
|
{ |
|
|
{ |
|
|
if (!string.IsNullOrEmpty(request.GiftTemplateSku)) |
|
|
if (!string.IsNullOrEmpty(request.GiftTemplateSku)) |
|
|
{ |
|
|
{ |
|
|
try |
|
|
DeleteSkuList(new DeleteSkuListRequest() |
|
|
{ |
|
|
|
|
|
foreach (var deleteSku in giftSkuIdList) |
|
|
|
|
|
{ |
|
|
|
|
|
DeleteSku(new DeleteSkuRequest() |
|
|
|
|
|
{ |
|
|
{ |
|
|
AppKey = request.AppKey, |
|
|
AppKey = request.AppKey, |
|
|
AppSecret = request.AppSecret, |
|
|
AppSecret = request.AppSecret, |
|
|
AppToken = request.AppToken, |
|
|
AppToken = request.AppToken, |
|
|
Platform = request.Platform, |
|
|
Platform = request.Platform, |
|
|
Sku = deleteSku |
|
|
SkuList = giftSkuIdList |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
catch { } |
|
|
|
|
|
} |
|
|
|
|
|
throw new BusinessException($"审核活动失败-{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}"); |
|
|
throw new BusinessException($"审核活动失败-{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
#endregion
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
#region 下架赠品sku
|
|
|
#region 下架赠品sku
|
|
|
foreach (var deleteSku in giftSkuIdList) |
|
|
DeleteSkuList(new DeleteSkuListRequest() |
|
|
{ |
|
|
|
|
|
DeleteSku(new DeleteSkuRequest() |
|
|
|
|
|
{ |
|
|
{ |
|
|
AppKey = request.AppKey, |
|
|
AppKey = request.AppKey, |
|
|
AppSecret = request.AppSecret, |
|
|
AppSecret = request.AppSecret, |
|
|
AppToken = request.AppToken, |
|
|
AppToken = request.AppToken, |
|
|
Platform = request.Platform, |
|
|
Platform = request.Platform, |
|
|
Sku = deleteSku |
|
|
SkuList = giftSkuIdList |
|
|
}); |
|
|
}); |
|
|
} |
|
|
|
|
|
#endregion
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
#region 设置完整标题
|
|
|
#region 设置完整标题
|
|
|