app ,http网站,活跃IP,协议统计,ua浏览器操作系统 改为bytes维度
This commit is contained in:
@@ -20,7 +20,7 @@
|
|||||||
SELECT MAX(stat_time) statTime FROM traffic_app_statistic WHERE app_type != 0
|
SELECT MAX(stat_time) statTime FROM traffic_app_statistic WHERE app_type != 0
|
||||||
</select>
|
</select>
|
||||||
<select id="appChart" resultType="java.util.HashMap">
|
<select id="appChart" resultType="java.util.HashMap">
|
||||||
SELECT app_type appType, SUM(link_num) count FROM traffic_app_statistic
|
SELECT app_type appType, SUM(c2s_byte_len+s2c_byte_len) count FROM traffic_app_statistic
|
||||||
WHERE app_type !=0 and stat_time = #{statTime}
|
WHERE app_type !=0 and stat_time = #{statTime}
|
||||||
GROUP BY app_type order by count desc limit 0,10
|
GROUP BY app_type order by count desc limit 0,10
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
SELECT MAX(stat_time) statTime FROM traffic_http_statistic WHERE web_id != 0
|
SELECT MAX(stat_time) statTime FROM traffic_http_statistic WHERE web_id != 0
|
||||||
</select>
|
</select>
|
||||||
<!-- 根据服务网站将域名分类 网站列表-->
|
<!-- 根据服务网站将域名分类 网站列表-->
|
||||||
<select id="getDomainByWebsiteList" resultType="com.nis.domain.restful.dashboard.TrafficHttpStatistic">
|
<select id="getDomainByWebsiteList" resultType="com.nis.domain.restful.dashboard.TrafficHttpStatistic">
|
||||||
SELECT SUM(c2s_byte_len+s2c_byte_len) count, IFNULL( website_service_id, 268435455 ) websiteServiceId
|
SELECT SUM(c2s_byte_len+s2c_byte_len) count, IFNULL( website_service_id, 268435455 ) websiteServiceId
|
||||||
FROM TRAFFIC_HTTP_STATISTIC t
|
FROM TRAFFIC_HTTP_STATISTIC t
|
||||||
LEFT JOIN ui_website_domain_topic u ON t.web_id = u.id
|
LEFT JOIN ui_website_domain_topic u ON t.web_id = u.id
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
and t.stat_time = #{statTime}
|
and t.stat_time = #{statTime}
|
||||||
GROUP BY u.website_service_id ORDER BY count desc limit 0,10
|
GROUP BY u.website_service_id ORDER BY count desc limit 0,10
|
||||||
</select>
|
</select>
|
||||||
<!-- 根据主题将域名分类 主题列表 最近五分钟top10-->
|
<!-- 根据主题将域名分类 主题列表 最近五分钟top10-->
|
||||||
<select id="getDomainByTopicList" resultType="java.util.HashMap">
|
<select id="getDomainByTopicList" resultType="java.util.HashMap">
|
||||||
SELECT SUM(c2s_byte_len+s2c_byte_len) count, IFNULL( topic_id, 268435455 ) topicId
|
SELECT SUM(c2s_byte_len+s2c_byte_len) count, IFNULL( topic_id, 268435455 ) topicId
|
||||||
FROM TRAFFIC_HTTP_STATISTIC t
|
FROM TRAFFIC_HTTP_STATISTIC t
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
GROUP BY u.topic_id ORDER BY count desc limit 0,10
|
GROUP BY u.topic_id ORDER BY count desc limit 0,10
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<!--获取上个时间段该网站站域名流量的数据量 -->
|
<!--获取上个时间段该网站站域名流量的数据量 -->
|
||||||
<select id="preWebsiteListCount" resultType="java.lang.Integer">
|
<select id="preWebsiteListCount" resultType="java.lang.Integer">
|
||||||
SELECT SUM(c2s_byte_len+s2c_byte_len) count FROM traffic_http_statistic t
|
SELECT SUM(c2s_byte_len+s2c_byte_len) count FROM traffic_http_statistic t
|
||||||
LEFT JOIN ui_website_domain_topic u ON t.web_id = u.id
|
LEFT JOIN ui_website_domain_topic u ON t.web_id = u.id
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
WHERE web_id !=0 and stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM traffic_http_statistic),INTERVAL 5 MINUTE)
|
WHERE web_id !=0 and stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM traffic_http_statistic),INTERVAL 5 MINUTE)
|
||||||
GROUP BY web_id ORDER BY count DESC limit 0,10
|
GROUP BY web_id ORDER BY count DESC limit 0,10
|
||||||
</select> -->
|
</select> -->
|
||||||
<!-- 根据网站分组获取子域名 -->
|
<!-- 根据网站分组获取子域名 -->
|
||||||
<select id="getDomainByWebsiteServiceId" resultType="java.util.HashMap">
|
<select id="getDomainByWebsiteServiceId" resultType="java.util.HashMap">
|
||||||
SELECT web_id webId,SUM(c2s_byte_len+s2c_byte_len) count
|
SELECT web_id webId,SUM(c2s_byte_len+s2c_byte_len) count
|
||||||
FROM traffic_http_statistic t
|
FROM traffic_http_statistic t
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
and t.stat_time =#{statTime}
|
and t.stat_time =#{statTime}
|
||||||
GROUP BY t.web_id ORDER BY count desc limit 0,10
|
GROUP BY t.web_id ORDER BY count desc limit 0,10
|
||||||
</select>
|
</select>
|
||||||
<!-- 根据主题分组获取子域名 -->
|
<!-- 根据主题分组获取子域名 -->
|
||||||
<select id="getDomainByTopicId" resultType="java.util.HashMap">
|
<select id="getDomainByTopicId" resultType="java.util.HashMap">
|
||||||
SELECT web_id webId,SUM(c2s_byte_len+s2c_byte_len) count
|
SELECT web_id webId,SUM(c2s_byte_len+s2c_byte_len) count
|
||||||
FROM traffic_http_statistic t
|
FROM traffic_http_statistic t
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
GROUP BY t.web_id ORDER BY count desc limit 0,10
|
GROUP BY t.web_id ORDER BY count desc limit 0,10
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 指定网站下的TOP10之外为others -->
|
<!-- 指定网站下的TOP10之外为others -->
|
||||||
<select id="websiteDomainOthers" resultType="java.util.HashMap">
|
<select id="websiteDomainOthers" resultType="java.util.HashMap">
|
||||||
SELECT SUM(c2s_byte_len+s2c_byte_len) count FROM traffic_http_statistic t
|
SELECT SUM(c2s_byte_len+s2c_byte_len) count FROM traffic_http_statistic t
|
||||||
LEFT JOIN ui_website_domain_topic u ON t.web_id=u.id
|
LEFT JOIN ui_website_domain_topic u ON t.web_id=u.id
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
</select>
|
</select>
|
||||||
<!-- IP流量统计五分钟-->
|
<!-- IP流量统计五分钟-->
|
||||||
<select id="ipActiveChart" resultType="java.util.LinkedHashMap">
|
<select id="ipActiveChart" resultType="java.util.LinkedHashMap">
|
||||||
SELECT ip_addr ipAddr, SUM(link_num) linkNum FROM traffic_ip_active_statistic
|
SELECT ip_addr ipAddr, SUM(c2s_byte_len+s2c_byte_len) linkNum FROM traffic_ip_active_statistic
|
||||||
WHERE stat_time = #{statTime}
|
WHERE stat_time = #{statTime}
|
||||||
GROUP BY ip_addr ORDER BY linkNum DESC limit 0,10
|
GROUP BY ip_addr ORDER BY linkNum DESC limit 0,10
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
SELECT MAX(stat_time) statTime FROM traffic_protocol_statistic WHERE proto_type != 0
|
SELECT MAX(stat_time) statTime FROM traffic_protocol_statistic WHERE proto_type != 0
|
||||||
</select>
|
</select>
|
||||||
<select id="protocolChart" resultType="java.util.HashMap">
|
<select id="protocolChart" resultType="java.util.HashMap">
|
||||||
SELECT proto_type protoType, SUM(link_num) count FROM traffic_protocol_statistic WHERE proto_type != 0
|
SELECT proto_type protoType, SUM(c2s_byte_len+s2c_byte_len) count FROM traffic_protocol_statistic WHERE proto_type != 0
|
||||||
AND stat_time = #{statTime} GROUP BY proto_type ORDER BY count DESC LIMIT 0, 10
|
AND stat_time = #{statTime} GROUP BY proto_type ORDER BY count DESC LIMIT 0, 10
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -22,25 +22,25 @@
|
|||||||
</select>
|
</select>
|
||||||
<!--获取操作系统列表TOP10 -->
|
<!--获取操作系统列表TOP10 -->
|
||||||
<select id="systemList" resultMap="BaseResultMap">
|
<select id="systemList" resultMap="BaseResultMap">
|
||||||
SELECT os_type osType, SUM(link_num) count FROM traffic_ua_statistic
|
SELECT os_type osType, SUM(c2s_byte_len+s2c_byte_len) count FROM traffic_ua_statistic
|
||||||
WHERE os_type !=0 and stat_time = #{statTime}
|
WHERE os_type !=0 and stat_time = #{statTime}
|
||||||
GROUP BY os_type ORDER BY count DESC limit 0,10
|
GROUP BY os_type ORDER BY count DESC limit 0,10
|
||||||
</select>
|
</select>
|
||||||
<!--获取上个时间段操作系统的数据量 -->
|
<!--获取上个时间段操作系统的数据量 -->
|
||||||
<select id="preSystemListCount" resultType="java.lang.Integer">
|
<select id="preSystemListCount" resultType="java.lang.Integer">
|
||||||
SELECT SUM(link_num) count FROM traffic_ua_statistic
|
SELECT SUM(c2s_byte_len+s2c_byte_len) count FROM traffic_ua_statistic
|
||||||
WHERE os_type !=0 and os_type=#{osType}
|
WHERE os_type !=0 and os_type=#{osType}
|
||||||
and stat_time = DATE_SUB(#{statTime},INTERVAL 5 MINUTE)
|
and stat_time = DATE_SUB(#{statTime},INTERVAL 5 MINUTE)
|
||||||
</select>
|
</select>
|
||||||
<!-- 根据操作系统获取浏览器分类 -->
|
<!-- 根据操作系统获取浏览器分类 -->
|
||||||
<select id="getBrowserBySystem" resultType="java.util.HashMap">
|
<select id="getBrowserBySystem" resultType="java.util.HashMap">
|
||||||
SELECT bs_type bsType, SUM(link_num) count FROM traffic_ua_statistic
|
SELECT bs_type bsType, SUM(c2s_byte_len+s2c_byte_len) count FROM traffic_ua_statistic
|
||||||
WHERE bs_type !=0 and os_type=#{osType} and stat_time = #{statTime}
|
WHERE bs_type !=0 and os_type=#{osType} and stat_time = #{statTime}
|
||||||
GROUP BY bs_type ORDER BY count DESC limit 0,10
|
GROUP BY bs_type ORDER BY count DESC limit 0,10
|
||||||
</select>
|
</select>
|
||||||
<!--浏览器TOP10后所有为others -->
|
<!--浏览器TOP10后所有为others -->
|
||||||
<select id="systemOthers" resultType="java.util.HashMap">
|
<select id="systemOthers" resultType="java.util.HashMap">
|
||||||
SELECT SUM(link_num) count FROM traffic_ua_statistic
|
SELECT SUM(c2s_byte_len+s2c_byte_len) count FROM traffic_ua_statistic
|
||||||
WHERE bs_type !=0 and os_type=#{osType}
|
WHERE bs_type !=0 and os_type=#{osType}
|
||||||
<if test="bsType!=null and bsType.size()>0">
|
<if test="bsType!=null and bsType.size()>0">
|
||||||
and bs_type not in
|
and bs_type not in
|
||||||
@@ -53,25 +53,25 @@
|
|||||||
|
|
||||||
<!--获取浏览器列表TOP10 -->
|
<!--获取浏览器列表TOP10 -->
|
||||||
<select id="browserList" resultMap="BaseResultMap">
|
<select id="browserList" resultMap="BaseResultMap">
|
||||||
SELECT bs_type bsType, SUM(link_num) count FROM traffic_ua_statistic
|
SELECT bs_type bsType, SUM(c2s_byte_len+s2c_byte_len) count FROM traffic_ua_statistic
|
||||||
WHERE bs_type !=0 and stat_time = #{statTime}
|
WHERE bs_type !=0 and stat_time = #{statTime}
|
||||||
GROUP BY bs_type ORDER BY count DESC limit 0,10
|
GROUP BY bs_type ORDER BY count DESC limit 0,10
|
||||||
</select>
|
</select>
|
||||||
<!--获取上个时间段浏览器的数据量 -->
|
<!--获取上个时间段浏览器的数据量 -->
|
||||||
<select id="preBrowserListCount" resultType="java.lang.Integer">
|
<select id="preBrowserListCount" resultType="java.lang.Integer">
|
||||||
SELECT SUM(link_num) count FROM traffic_ua_statistic
|
SELECT SUM(c2s_byte_len+s2c_byte_len) count FROM traffic_ua_statistic
|
||||||
WHERE bs_type !=0 and bs_type=#{bsType}
|
WHERE bs_type !=0 and bs_type=#{bsType}
|
||||||
and stat_time = DATE_SUB(#{statTime},INTERVAL 5 MINUTE)
|
and stat_time = DATE_SUB(#{statTime},INTERVAL 5 MINUTE)
|
||||||
</select>
|
</select>
|
||||||
<!-- 根据浏览器获取操作系统分类 -->
|
<!-- 根据浏览器获取操作系统分类 -->
|
||||||
<select id="getSystemBybrowser" resultType="java.util.HashMap">
|
<select id="getSystemBybrowser" resultType="java.util.HashMap">
|
||||||
SELECT os_type osType, SUM(link_num) count FROM traffic_ua_statistic
|
SELECT os_type osType, SUM(c2s_byte_len+s2c_byte_len) count FROM traffic_ua_statistic
|
||||||
WHERE os_type !=0 and bs_type=#{bsType} and stat_time = #{statTime}
|
WHERE os_type !=0 and bs_type=#{bsType} and stat_time = #{statTime}
|
||||||
GROUP BY os_type ORDER BY count DESC limit 0,10
|
GROUP BY os_type ORDER BY count DESC limit 0,10
|
||||||
</select>
|
</select>
|
||||||
<!--操作系统TOP10后所有为others -->
|
<!--操作系统TOP10后所有为others -->
|
||||||
<select id="browserOthers" parameterType="java.util.List" resultType="java.util.HashMap">
|
<select id="browserOthers" parameterType="java.util.List" resultType="java.util.HashMap">
|
||||||
SELECT SUM(link_num) count FROM traffic_ua_statistic
|
SELECT SUM(c2s_byte_len+s2c_byte_len) count FROM traffic_ua_statistic
|
||||||
WHERE os_type !=0 and bs_type=#{bsType}
|
WHERE os_type !=0 and bs_type=#{bsType}
|
||||||
<if test="osType!=null and osType.size()>0">
|
<if test="osType!=null and osType.size()>0">
|
||||||
and os_type not in
|
and os_type not in
|
||||||
|
|||||||
Reference in New Issue
Block a user