|
@ -834,6 +834,39 @@ namespace BBWY.Server.Business |
|
|
#endregion
|
|
|
#endregion
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void DisableGiftSkuAndRecoverFullTitle(string appKey, |
|
|
|
|
|
string appSecret, |
|
|
|
|
|
string appToken, |
|
|
|
|
|
IList<string> deleteSkuList, |
|
|
|
|
|
string mainProductSpu, |
|
|
|
|
|
string fullTitle, |
|
|
|
|
|
string brandName, |
|
|
|
|
|
bool haveGiftTemplateSku) |
|
|
|
|
|
{ |
|
|
|
|
|
var jdClient = GetJdClient(appKey, appSecret); |
|
|
|
|
|
|
|
|
|
|
|
if (haveGiftTemplateSku && deleteSkuList != null && deleteSkuList.Count() > 0 && !deleteSkuList.Any(s => string.IsNullOrEmpty(s))) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#region 设置完整标题
|
|
|
|
|
|
{ |
|
|
|
|
|
if (string.IsNullOrEmpty(brandName)) |
|
|
|
|
|
return; |
|
|
|
|
|
var req = new WareWriteUpdateWareTitleRequest(); |
|
|
|
|
|
req.wareId = long.Parse(mainProductSpu); |
|
|
|
|
|
if (!fullTitle.StartsWith(brandName)) |
|
|
|
|
|
req.title = $"{brandName}{fullTitle}"; |
|
|
|
|
|
else |
|
|
|
|
|
req.title = fullTitle; |
|
|
|
|
|
var response = jdClient.Execute(req, appToken, DateTime.Now.ToLocalTime()); |
|
|
|
|
|
if (response.IsError) |
|
|
|
|
|
throw new BusinessException($"设置完整标题出错-{(string.IsNullOrEmpty(response.ErrorMsg) ? response.ErrMsg : response.ErrorMsg)}"); |
|
|
|
|
|
} |
|
|
|
|
|
#endregion
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// 添加JD促销活动sku
|
|
|
/// 添加JD促销活动sku
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|