|
|
@ -147,7 +147,7 @@ namespace BBWY.Server.Business |
|
|
|
else if (!string.IsNullOrEmpty(searchProductSkuRequest.Sku)) |
|
|
|
req_skuList.skuId = string.Join(",", skuIdList.Skip((pageIndex - 1) * pageSize).Take(pageSize)); |
|
|
|
|
|
|
|
var rep_skuList = jdClient.Execute(req_skuList, searchProductSkuRequest.AppToken, DateTime.Now.ToLocalTime()); |
|
|
|
var rep_skuList = jdClient.Execute(req_skuList, searchProductSkuRequest.AppToken, DateTime.Now.ToLocalTime()); |
|
|
|
if (rep_skuList.IsError) |
|
|
|
throw new BusinessException(string.IsNullOrEmpty(rep_skuList.ErrorMsg) ? rep_skuList.ErrMsg : rep_skuList.ErrorMsg); |
|
|
|
|
|
|
@ -714,8 +714,13 @@ namespace BBWY.Server.Business |
|
|
|
var pageSize = 100; |
|
|
|
var totalPage = (skuList.Count() - 1) / pageSize + 1; |
|
|
|
|
|
|
|
for (var i = 0; i < totalPage; i++) |
|
|
|
while (pageIndex <= totalPage) |
|
|
|
{ |
|
|
|
req.skuIds = string.Empty; |
|
|
|
req.jdPrices = string.Empty; |
|
|
|
req.bindType = string.Empty; |
|
|
|
req.num = string.Empty; |
|
|
|
req.promoPrices = string.Empty; |
|
|
|
var currentPageList = skuList.Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList(); |
|
|
|
|
|
|
|
foreach (var sku in currentPageList) |
|
|
@ -736,6 +741,7 @@ namespace BBWY.Server.Business |
|
|
|
var res = jdClient.Execute(req, token, DateTime.Now.ToLocalTime()); |
|
|
|
if (res.IsError) |
|
|
|
throw new BusinessException($"添加活动sku失败-{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}"); |
|
|
|
pageIndex++; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|