Browse Source

评价助手完成任务清空赠品库存只记录伊琳的执行结果

master
shanji 1 year ago
parent
commit
cf71d99344
  1. 9
      BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs
  2. 18
      BBWY.Server.Business/PlatformSDK/JDBusiness.cs

9
BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs

@ -1166,6 +1166,15 @@ namespace BBWY.Server.Business
Platform = Enums.Platform.,
Items = giftSkuList
}, null, HttpMethod.Post);
if (shop.ShopId == "12899501")
{
nLogManager.GetLogger(loggerName).Info($"执行赠品库存清空,任务[{jobDoneTask}] 清空库存结果 {JsonConvert.SerializeObject(httpResult)}");
}
}
else if (shop.ShopId == "12899501")
{
nLogManager.GetLogger(loggerName).Info($"执行赠品库存清空,任务[{jobDoneTask}]没有赠品");
}
}
#endregion

18
BBWY.Server.Business/PlatformSDK/JDBusiness.cs

@ -2072,18 +2072,6 @@ namespace BBWY.Server.Business
public override void SetSkuStockNum(SetSkuStockNumRequest request)
{
/*
foreach (var giftSkuId in giftSkuIdList)
{
var req = new StockWriteUpdateSkuStockRequest();
req.skuId = long.Parse(giftSkuId);
req.stockNum = 9999;
req.storeId = 0;
var res = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime());
if (res.IsError)
throw new BusinessException($"设置全国仓库存失败-{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}");
}
*/
var jdClient = GetJdClient(request.AppKey, request.AppSecret);
foreach (var item in request.Items)
@ -2092,9 +2080,9 @@ namespace BBWY.Server.Business
req.skuId = long.Parse(item.Sku);
req.stockNum = item.StockNum;
req.storeId = item.StoreId;
_ = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime());
//if (res.IsError)
// throw new BusinessException($"设置全国仓库存失败-{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}");
var res = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime());
if (res.IsError)
throw new BusinessException($"设置全国仓库存失败-{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}");
}
}

Loading…
Cancel
Save