提交 429bed42 authored 作者: 李秋林's avatar 李秋林

报表查询近7日数据

上级 5c8d27b0
......@@ -27,6 +27,11 @@ public class MarketDetailWq {
*/
private Integer month;
/**
* 前7天 - 日期
*/
private Date firstDay7;
/**
* 指定截止日期,默认昨天
*/
......
......@@ -38,6 +38,7 @@ public class SummaryMarketDailyDetailImpl implements ISummaryMarketDailyDetailSe
Date date = mqw.getDate();
mqw.setYear(DateUtil.year(date));
mqw.setMonth(DateUtil.month(date) + 1);
mqw.setFirstDay7(DateUtil.offsetDay(date,-7));
List<MarketSummaryDto> marketSummaryDtos = ecMarketDailyDetailDao.summaryByPlatform(mqw);
// 获取平台-年目标数据:
......
......@@ -122,7 +122,7 @@
group by platform, platform_id) em,
(select platform, platform_id, sum(sale_count) as sale_count_w, sum(sale_sum) as sale_sum_w
from ec_market_daily_detail
where date >= #{qw.date}
where date between #{qw.firstDay7} and #{qw.date}
and platform_id is not null
<include refid="summaryWhere"/>
group by platform, platform_id) ew,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论