Browse Source

Merge branch 'master' of http://code.qiyue666.com/pengcong001/bbwy

AddValidOverTime
506583276@qq.com 2 years ago
parent
commit
c54c81f1f4
  1. 4
      BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs
  2. 8
      BBWY.Server.Business/PlatformSDK/JDBusiness.cs
  3. 2
      BBWY.Server.Model/Dto/Request/PromotionTask/StartPromotionTaskRequest.cs

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

@ -513,6 +513,8 @@ namespace BBWY.Server.Business
} }
if (request.IsDebug == null || request.IsDebug == false)
{
if (!string.IsNullOrEmpty(dbPromotionTask.CustomMotherSku)) if (!string.IsNullOrEmpty(dbPromotionTask.CustomMotherSku))
CheckRepeatSkuInRuningTask(runingTaskList, dbPromotionTask.CustomMotherSku); CheckRepeatSkuInRuningTask(runingTaskList, dbPromotionTask.CustomMotherSku);
@ -521,6 +523,8 @@ namespace BBWY.Server.Business
if (!string.IsNullOrEmpty(dbPromotionTask.MainProductSku)) if (!string.IsNullOrEmpty(dbPromotionTask.MainProductSku))
CheckRepeatSkuInRuningTask(runingTaskList, dbPromotionTask.MainProductSku); CheckRepeatSkuInRuningTask(runingTaskList, dbPromotionTask.MainProductSku);
}
var host = GetPlatformRelayAPIHost(Enums.Platform.); var host = GetPlatformRelayAPIHost(Enums.Platform.);

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

@ -967,11 +967,11 @@ namespace BBWY.Server.Business
var response = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime()); var response = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime());
if (response.Json == null) if (response.Json == null)
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["attrValueList"] != null && j["attrValueList"].Count() > 0);
if (colorProperty == null) if (colorProperty == null)
{ {
RollBackWhenStartPromotionError(request.AppKey, request.AppSecret, request.AppToken, giftSkuIdList, request.MainProductSpu, request.FullTitle, brandName, haveGiftTemplateSku); 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();
} }
@ -1055,6 +1055,10 @@ namespace BBWY.Server.Business
var req = new SkuWriteUpdateSkusRequest(); var req = new SkuWriteUpdateSkusRequest();
req.wareId = wareId; req.wareId = wareId;
req.skus = skusParamList; req.skus = skusParamList;
//输出日志
nLogManager.Default().Info($"上架赠品请求参数,任务Id{request.Id},{JsonConvert.SerializeObject(req)}");
var res = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime()); var res = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime());
if (res.Json == null) if (res.Json == null)

2
BBWY.Server.Model/Dto/Request/PromotionTask/StartPromotionTaskRequest.cs

@ -8,6 +8,8 @@ namespace BBWY.Server.Model.Dto
public class StartPromotionTaskRequest : PlatformRequest public class StartPromotionTaskRequest : PlatformRequest
{ {
public long Id { get; set; } public long Id { get; set; }
public bool? IsDebug { get; set; }
} }
public class StartPromotionTaskRequest2 : PlatformRequest public class StartPromotionTaskRequest2 : PlatformRequest

Loading…
Cancel
Save