From 84ba35ac28a7f3221ca058a308cfbcc8ad60dbcb Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Sun, 19 Nov 2023 22:46:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81GOI=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=EF=BC=8C=E6=80=BB=E8=8A=B1=E8=B4=B9=E5=92=8C=E6=80=BB=E4=BA=8F?= =?UTF-8?q?=E6=8D=9F=E5=BA=94=E7=94=A8=E6=97=B6=E9=97=B4=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SiNan.Business/GOIBusiness.cs | 6 ++++-- SiNan.Model/Db/Product/Product.cs | 1 - SiNan.Model/Dto/Response/GOI/ProductGOIResponse.cs | 4 ++-- SiNan.Model/Dto/Response/GOI/ProductSkuGOIResponse.cs | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/SiNan.Business/GOIBusiness.cs b/SiNan.Business/GOIBusiness.cs index 1f73a5f..db1d6c5 100644 --- a/SiNan.Business/GOIBusiness.cs +++ b/SiNan.Business/GOIBusiness.cs @@ -339,6 +339,7 @@ namespace SiNan.Business { if (request.ShopId == 0) throw new BusinessException("缺少店铺Id"); + request.EndDate = request.EndDate.Date.AddDays(1).AddSeconds(-1); if (request.PageSize > 10) request.PageSize = 10; @@ -385,7 +386,7 @@ namespace SiNan.Business var skuList = fsql.Select().Where(ps => productIdList.Contains(ps.ProductId) && ps.State == 1).ToList(); var skuIdList = skuList.Select(s => s.Id).ToList(); - var historyPopularizeLevelGOIList = StatisticsPopularizeLevelGOI(skuIdList, null, null); + var historyPopularizeLevelGOIList = StatisticsPopularizeLevelGOI(skuIdList, request.StartDate, request.EndDate); foreach (var product in productList) { @@ -407,6 +408,7 @@ namespace SiNan.Business { if (!string.IsNullOrEmpty(request.Spu)) throw new BusinessException("缺少spu"); + request.EndDate = request.EndDate.Date.AddDays(1).AddSeconds(-1); var productSkuList = fsql.Select() .InnerJoin((ps, aps) => ps.Id == aps.Id) @@ -447,7 +449,7 @@ namespace SiNan.Business }).Map>(); var skuIdList = productSkuList.Select(ps => ps.Id).ToList(); - var historyPopularizeLevelGOIList = StatisticsPopularizeLevelGOI(skuIdList, null, null); + var historyPopularizeLevelGOIList = StatisticsPopularizeLevelGOI(skuIdList, request.StartDate, request.EndDate); foreach (var productSku in productSkuList) { var historyPopularizeLevelGOI = historyPopularizeLevelGOIList.FirstOrDefault(x => x.Sku == productSku.Id); diff --git a/SiNan.Model/Db/Product/Product.cs b/SiNan.Model/Db/Product/Product.cs index fe3353b..3268207 100644 --- a/SiNan.Model/Db/Product/Product.cs +++ b/SiNan.Model/Db/Product/Product.cs @@ -54,7 +54,6 @@ namespace SiNan.Model.Db /// [Column(DbType = "decimal(18,2)")] public decimal? MaxDeficitThreshold { get; set; } = 0.00M; - #endregion } } diff --git a/SiNan.Model/Dto/Response/GOI/ProductGOIResponse.cs b/SiNan.Model/Dto/Response/GOI/ProductGOIResponse.cs index 6e32cfa..9e6a3a1 100644 --- a/SiNan.Model/Dto/Response/GOI/ProductGOIResponse.cs +++ b/SiNan.Model/Dto/Response/GOI/ProductGOIResponse.cs @@ -33,12 +33,12 @@ public GOIResponse PromotionGOI_Recent30Day { get; set; } /// - /// 累计花费 + /// 总花费 /// public decimal TotalCost { get; set; } /// - /// 累计亏损 (正赚负亏) + /// 总亏损 (正赚负亏) /// public decimal TotalDeficit { get; set; } diff --git a/SiNan.Model/Dto/Response/GOI/ProductSkuGOIResponse.cs b/SiNan.Model/Dto/Response/GOI/ProductSkuGOIResponse.cs index 3cc7067..9865d94 100644 --- a/SiNan.Model/Dto/Response/GOI/ProductSkuGOIResponse.cs +++ b/SiNan.Model/Dto/Response/GOI/ProductSkuGOIResponse.cs @@ -33,12 +33,12 @@ public GOIResponse PromotionGOI_Recent30Day { get; set; } /// - /// 累计花费 + /// 总花费 /// public decimal TotalCost { get; set; } /// - /// 累计亏损 (正赚负亏) + /// 总亏损 (正赚负亏) /// public decimal TotalDeficit { get; set; }