Browse Source

司南聚合遗漏bug

GOIAggregation
sanji 2 years ago
parent
commit
a293b8343f
  1. 4
      SiNan.Business/AggregationBusiness.cs
  2. 19
      SiNan.Business/GOIBusiness.cs

4
SiNan.Business/AggregationBusiness.cs

@ -810,8 +810,6 @@ namespace SiNan.Business
var adSkuGoi_AggregationDate_PopularizeLevel = aggregationDate_PopularizeLevelList.FirstOrDefault(x => x.Sku == adSku.Sku && x.BusinessType == adSku.BusinessType);
var adSkuGoi_AggregationDate_ProductLevel = aggregationDate_ProductLevelList.FirstOrDefault(x => x.Sku == adSku.Sku && x.BusinessType == adSku.BusinessType);
if (adSkuGoi_AggregationDate_PopularizeLevel != null || adSkuGoi_AggregationDate_ProductLevel != null)
{
var adSkuDailyAggregation = new AggregationJDPopularizeAdSkuDaily()
{
Id = idGenerator.NewLong(),
@ -830,7 +828,7 @@ namespace SiNan.Business
AdId = adSku.AdId
};
insertAggregationAdSkuDailyList.Add(adSkuDailyAggregation);
}
#endregion
}

19
SiNan.Business/GOIBusiness.cs

@ -228,27 +228,28 @@ namespace SiNan.Business
foreach (var skuId in skuIdList)
{
{
var cost = costs.FirstOrDefault(x => x.Sku == skuId && x.BusinessType == 2)?.Cost ?? 0M;
var profit = profits.FirstOrDefault(x => x.Sku == skuId && x.BusinessType == 2)?.Profit ?? 0M;
if (cost != 0 || profit != 0)
var kuaicheCost = costs.FirstOrDefault(x => x.Sku == skuId && x.BusinessType == 2);
var kuaicheProfit = profits.FirstOrDefault(x => x.Sku == skuId && x.BusinessType == 2);
if (kuaicheCost != null || kuaicheProfit != null)
{
var cost = kuaicheCost?.Cost ?? 0M;
var profit = kuaicheProfit?.Profit ?? 0M;
var adskuGoi = new GOIByAdSku() { Sku = skuId, Cost = cost, Profit = profit, BusinessType = 2 };
list.Add(adskuGoi);
}
}
{
var cost = costs.FirstOrDefault(x => x.Sku == skuId && x.BusinessType == 134217728)?.Cost ?? 0M;
var profit = profits.FirstOrDefault(x => x.Sku == skuId && x.BusinessType == 134217728)?.Profit ?? 0M;
if (cost != 0 || profit != 0)
var zntfCost = costs.FirstOrDefault(x => x.Sku == skuId && x.BusinessType == 134217728);
var zntfProfit = profits.FirstOrDefault(x => x.Sku == skuId && x.BusinessType == 134217728);
if (zntfCost != null || zntfProfit != null)
{
var cost = zntfCost?.Cost ?? 0M;
var profit = zntfProfit?.Profit ?? 0M;
var adskuGoi = new GOIByAdSku() { Sku = skuId, Cost = cost, Profit = profit, BusinessType = 134217728 };
list.Add(adskuGoi);
}
}
}
return list;
}

Loading…
Cancel
Save