大屏统计图表接口返回值增加上一段时间参数preCount,其它类型others

This commit is contained in:
zhanghongqing
2018-07-23 17:44:18 +08:00
parent d5aff2e139
commit 5079032c09
8 changed files with 157 additions and 29 deletions

View File

@@ -16,8 +16,8 @@
stat_time
</sql>
<select id="appChart" resultType="java.util.HashMap">
SELECT app_type appType, count(app_type) count ,(SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen FROM galaxy.traffic_app_statistic
WHERE app_type !=0 and stat_time >= DATE_SUB(NOW(),INTERVAL 555 HOUR)
GROUP BY app_type limit 0,10
SELECT app_type appType, (SUM(c2s_pkt_num)+SUM(s2c_pkt_num)+SUM(c2s_byte_len)+SUM(s2c_byte_len)) count ,(SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen FROM galaxy.traffic_app_statistic
WHERE app_type !=0 and stat_time >= DATE_SUB(NOW(),INTERVAL 5 MINUTE)
GROUP BY app_type order by count desc limit 0,10
</select>
</mapper>