|
@@ -8,7 +8,8 @@
|
|
sum(charge) cost,
|
|
sum(charge) cost,
|
|
sum(photo_show) photoShow,
|
|
sum(photo_show) photoShow,
|
|
sum(photo_click) photoClick,
|
|
sum(photo_click) photoClick,
|
|
- sum(aclick) aclick
|
|
|
|
|
|
+ sum(aclick) aclick,
|
|
|
|
+ max(stat_hour) maxHour
|
|
from
|
|
from
|
|
ctop_kuaishou_report_hourly_account
|
|
ctop_kuaishou_report_hourly_account
|
|
where stat_date = #{date}
|
|
where stat_date = #{date}
|
|
@@ -66,6 +67,18 @@
|
|
and stat_hour = #{statHour}
|
|
and stat_hour = #{statHour}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="selectSumDayHourlyByHourAndDate" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
+ select
|
|
|
|
+ sum(charge) cost,
|
|
|
|
+ sum(photo_show) photoShow,
|
|
|
|
+ sum(photo_click) photoClick,
|
|
|
|
+ sum(aclick) aclick
|
|
|
|
+ from
|
|
|
|
+ ctop_kuaishou_report_hourly_account
|
|
|
|
+ where stat_date = #{date}
|
|
|
|
+ and stat_hour <= #{statHour}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
|
|
<select id="selectDayDetailByDate" resultType="com.alibaba.fastjson.JSONObject">
|
|
<select id="selectDayDetailByDate" resultType="com.alibaba.fastjson.JSONObject">
|
|
select
|
|
select
|
|
@@ -79,7 +92,7 @@
|
|
where stat_date <= #{startDate}
|
|
where stat_date <= #{startDate}
|
|
and stat_date >= #{endDate}
|
|
and stat_date >= #{endDate}
|
|
group by stat_date
|
|
group by stat_date
|
|
- order by stat_date desc
|
|
|
|
|
|
+ order by stat_date asc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
@@ -95,7 +108,7 @@
|
|
where stat_date <= #{startDate}
|
|
where stat_date <= #{startDate}
|
|
and stat_date >= #{endDate}
|
|
and stat_date >= #{endDate}
|
|
group by DATE_FORMAT(stat_date,'%Y-%m')
|
|
group by DATE_FORMAT(stat_date,'%Y-%m')
|
|
- order by stat_date desc
|
|
|
|
|
|
+ order by stat_date asc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectAllDayDetailByMonth" resultType="com.alibaba.fastjson.JSONObject">
|
|
<select id="selectAllDayDetailByMonth" resultType="com.alibaba.fastjson.JSONObject">
|
|
@@ -108,7 +121,7 @@
|
|
from
|
|
from
|
|
ctop_kuaishou_report_daily_account
|
|
ctop_kuaishou_report_daily_account
|
|
group by DATE_FORMAT(stat_date,'%Y-%m')
|
|
group by DATE_FORMAT(stat_date,'%Y-%m')
|
|
- order by stat_date desc
|
|
|
|
|
|
+ order by stat_date asc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
@@ -136,7 +149,7 @@
|
|
ctop_kuaishou_report_daily_account
|
|
ctop_kuaishou_report_daily_account
|
|
where DATE_FORMAT(stat_date,'%Y-%m') = #{date}
|
|
where DATE_FORMAT(stat_date,'%Y-%m') = #{date}
|
|
group by stat_date
|
|
group by stat_date
|
|
- order by stat_date desc
|
|
|
|
|
|
+ order by stat_date asc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
@@ -180,7 +193,7 @@
|
|
ctop_kuaishou_report_hourly_account
|
|
ctop_kuaishou_report_hourly_account
|
|
where stat_date = #{date}
|
|
where stat_date = #{date}
|
|
group by stat_hour
|
|
group by stat_hour
|
|
- order by stat_hour desc
|
|
|
|
|
|
+ order by stat_hour asc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|