Browse Source

上架流程区分新品老品 (未完)

pjzs_starttask_update
sanji 1 year ago
parent
commit
6c2a9bacc4
  1. 17
      BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs
  2. 5
      BBWY.Server.Model/Db/EvaluationAssistant/PromotionTask.cs
  3. 5
      BBWY.Server.Model/Dto/Request/PromotionTask/AddOrEditPromotionTaskRequest.cs
  4. 10
      BBWY.Server.Model/Dto/Request/PromotionTask/StartPromotionTaskRequest.cs
  5. 5
      BBWY.Server.Model/Dto/Response/PromotionTask/PromotionTaskResponse.cs

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

@ -164,11 +164,22 @@ namespace BBWY.Server.Business
if (request.GiftTemplateId == 0 && string.IsNullOrEmpty(request.MainProductGiftSku))
throw new BusinessException("赠品模板和主商品赠品SKU至少具备一个");
if (request.IsNewProduct == null)
request.IsNewProduct = 1;
if (request.IsNewProduct == 1)
{
if (string.IsNullOrEmpty(request.FullTitle))
throw new BusinessException("缺少完整标题");
if (string.IsNullOrEmpty(request.SimpleTitle))
throw new BusinessException("缺少精简标题");
}
else if (request.IsNewProduct == 0)
{
if (string.IsNullOrEmpty(request.FullTitle))
throw new BusinessException("缺少完整标题");
}
if (string.IsNullOrEmpty(request.ActivityName))
throw new BusinessException("缺少任务名称");
@ -234,7 +245,8 @@ namespace BBWY.Server.Business
SpuPublishTime = spuResponse.Data.Items[0].CreateTime,
TaskCount = request.TaskCount,
CustomMotherSku = request.CustomMotherSku,
OuterId = request.OuterId
OuterId = request.OuterId,
IsNewProduct = request.IsNewProduct
};
fsql.Insert(promotionTask).ExecuteAffrows();
}
@ -679,7 +691,8 @@ namespace BBWY.Server.Business
JoinSkuCount = joinSkuList.Count(),
JoinSkuList = joinSkuList,
PJZSDingDingKey = shop.PJZSDingDingKey,
PJZSDingDingWebHook = shop.PJZSDingDingWebHook
PJZSDingDingWebHook = shop.PJZSDingDingWebHook,
IsNewProduct = promotionTask.IsNewProduct ?? 1
}, GetYunDingRequestHeader(), HttpMethod.Post, timeOutSeconds: 500);
var errorBack = new Action<long, string>((id, errorMsg) =>

5
BBWY.Server.Model/Db/EvaluationAssistant/PromotionTask.cs

@ -145,6 +145,11 @@ namespace BBWY.Server.Model.Db
/// 外部Id
/// </summary>
public string OuterId { get; set; }
/// <summary>
/// 是否新品(0=老 1=新)
/// </summary>
public int? IsNewProduct { get; set; } = 1;
}
}

5
BBWY.Server.Model/Dto/Request/PromotionTask/AddOrEditPromotionTaskRequest.cs

@ -54,5 +54,10 @@
/// 外部Id
/// </summary>
public string OuterId { get; set; }
/// <summary>
/// 是否为新品 是否新品(0=老 1=新)
/// </summary>
public int? IsNewProduct { get; set; }
}
}

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

@ -76,6 +76,11 @@ namespace BBWY.Server.Model.Dto
public bool MainProductSkuInStore { get; set; }
public string OuterId { get; set; }
/// <summary>
/// 是否新品 (0=老品 1=新品)
/// </summary>
public int IsNewProduct { get; set; }
}
public class StartPromotionTaskDelayRequest : PlatformRequest
@ -113,5 +118,10 @@ namespace BBWY.Server.Model.Dto
public string PJZSDingDingKey { get; set; }
public string PJZSDingDingWebHook { get; set; }
/// <summary>
/// 是否新品 (0=老品 1=新品)
/// </summary>
public int IsNewProduct { get; set; }
}
}

5
BBWY.Server.Model/Dto/Response/PromotionTask/PromotionTaskResponse.cs

@ -133,6 +133,11 @@ namespace BBWY.Server.Model.Dto
/// 外部Id
/// </summary>
public string OuterId { get; set; }
/// <summary>
/// 是否新品(0=老 1=新)
/// </summary>
public int? IsNewProduct { get; set; }
}
public class PromotionTaskResponse

Loading…
Cancel
Save