修改网站统计sql条件

This commit is contained in:
zhanghongqing
2018-09-26 19:14:46 +08:00
parent 59a36d63e1
commit 5564d2c3c7

View File

@@ -19,6 +19,7 @@
<select id="getDomainByWebsiteList" resultType="com.nis.domain.restful.dashboard.TrafficHttpStatistic">
SELECT SUM(link_num) count, IFNULL( website_service_id, 268435455 ) websiteServiceId ,(SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen
FROM galaxy.TRAFFIC_HTTP_STATISTIC t
LEFT JOIN galaxy.ui_website_domain_topic u ON t.web_id = u.id
and t.web_id!=0
and t.stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_http_statistic),INTERVAL 5 MINUTE)
GROUP BY u.website_service_id ORDER BY count limit 0,10
@@ -26,6 +27,7 @@
<!-- 根据主题将域名分类 主题列表 最近五分钟top10-->
<select id="getDomainByTopicList" resultType="java.util.HashMap">
SELECT SUM(link_num) count, IFNULL( topic_id, 268435455 ) topicId ,(SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen
FROM galaxy.TRAFFIC_HTTP_STATISTIC t
LEFT JOIN galaxy.ui_website_domain_topic u ON t.web_id = u.id
and t.web_id!=0
and t.stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_http_statistic),INTERVAL 5 MINUTE)
@@ -68,6 +70,7 @@
<!-- 指定网站下的TOP10之外为others -->
<select id="websiteDomainOthers" resultType="java.util.HashMap">
SELECT SUM(link_num) count ,(SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen FROM galaxy.traffic_http_statistic t
LEFT JOIN galaxy.ui_website_domain_topic u ON t.web_id=u.id
where u.website_service_id=#{websiteServiceId}
and t.web_id!=0
<if test="webIdList!=null and webIdList.size()>0">