From 203b448f9e37094bf4e847905908f125e68dd051 Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Sun, 3 Dec 2023 00:15:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=81=9A=E5=90=88=E7=BB=86?= =?UTF-8?q?=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SiNan.Business/AggregationBusiness.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SiNan.Business/AggregationBusiness.cs b/SiNan.Business/AggregationBusiness.cs index fc03980..f02f604 100644 --- a/SiNan.Business/AggregationBusiness.cs +++ b/SiNan.Business/AggregationBusiness.cs @@ -460,7 +460,7 @@ namespace SiNan.Business var IsAggregationDateEqualsYesterDay = (DateTime.Now.Date - aggregationDate).TotalDays == 1; var campaignList = fsql.Select().Where(c => c.ShopId == shopId && c.Date == aggregationDate) - .WhereIf(campaignId != null, c => c.CampaignId == campaignId) + .WhereIf(campaignId != null && campaignId != 0, c => c.CampaignId == campaignId) //.GroupBy(c => new { c.CampaignId, c.BusinessType }) .ToList(); @@ -625,9 +625,9 @@ namespace SiNan.Business var IsAggregationDateEqualsYesterDay = (DateTime.Now.Date - aggregationDate).TotalDays == 1; var adGroupList = fsql.Select().Where(c => c.ShopId == shopId && c.Date == aggregationDate) - .WhereIf(adGroupId != null, c => c.AdGroupId == adGroupId) - //.GroupBy(c => new { c.CampaignId, c.BusinessType }) - .ToList(); + .WhereIf(adGroupId != null && adGroupId != 0, c => c.AdGroupId == adGroupId) + //.GroupBy(c => new { c.CampaignId, c.BusinessType }) + .ToList(); var adGroupIdList = adGroupList.Select(j => j.AdGroupId).Distinct().ToArray(); if (adGroupIdList.Count() == 0) @@ -788,7 +788,7 @@ namespace SiNan.Business var IsAggregationDateEqualsYesterDay = (DateTime.Now.Date - aggregationDate).TotalDays == 1; var adSkuList = fsql.Select().Where(c => c.ShopId == shopId && c.Date == aggregationDate) - .WhereIf(skuId != null, c => c.Sku == skuId) + .WhereIf(!string.IsNullOrEmpty(skuId), c => c.Sku == skuId) //.GroupBy(c => new { c.Sku, c.BusinessType }) .ToList();