|
|
@ -428,7 +428,8 @@ namespace BBWY.Server.Business |
|
|
|
|
|
|
|
public void UpdateSkuGift() |
|
|
|
{ |
|
|
|
var dbSkuIdList = fsql.Select<ProductSku>().Where(ps => ps.IsGift == false).ToList(ps => ps.Id); |
|
|
|
var dbSkuIdList = fsql.Select<ProductSku>().Where(ps => ps.IsGift == false).ToList(ps => ps.Id); //非赠品sku
|
|
|
|
Console.WriteLine($"非赠品sku {dbSkuIdList.Count()}"); |
|
|
|
var ptList = fsql.Select<PromotionTask>().Where(pt => !string.IsNullOrEmpty(pt.GiftTemplatePutNewSku)).ToList(); |
|
|
|
var giftSkuList = new List<string>(); |
|
|
|
var splitChar = new char[] { ',' }; |
|
|
@ -436,7 +437,10 @@ namespace BBWY.Server.Business |
|
|
|
{ |
|
|
|
giftSkuList.AddRange(pt.GiftTemplatePutNewSku.Split(splitChar, StringSplitOptions.RemoveEmptyEntries)); |
|
|
|
} |
|
|
|
Console.WriteLine($"pjzs任务赠品sku {giftSkuList.Count()}"); |
|
|
|
|
|
|
|
var updateGiftSkuIdList = dbSkuIdList.Intersect(giftSkuList).ToList(); |
|
|
|
Console.WriteLine($"两者交集 Intersect {updateGiftSkuIdList.Count()}"); |
|
|
|
|
|
|
|
var updateList = new List<string>(); |
|
|
|
var index = 1; |
|
|
|