|
|
@ -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<ProductSku>().Where(ps => productIdList.Contains(ps.ProductId) && ps.State == 1).ToList<ProductSkuResponse>(); |
|
|
|
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<ProductSku, AggregationJDPopularizeSku>() |
|
|
|
.InnerJoin((ps, aps) => ps.Id == aps.Id) |
|
|
@ -447,7 +449,7 @@ namespace SiNan.Business |
|
|
|
}).Map<List<ProductSkuGOIResponse>>(); |
|
|
|
|
|
|
|
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); |
|
|
|