Merge branch 'Release-1.3' into develop
# Conflicts: # src/main/java/com/nis/web/dao/dashboard/NtcTotalReportDao.xml # src/main/java/com/nis/web/dao/dashboard/TrafficUaStatisticDao.xml
This commit is contained in:
@@ -82,14 +82,17 @@ CREATE TABLE `ui_sys_dict_info` (
|
|||||||
|
|
||||||
CREATE TABLE `ui_code_app_dic` (
|
CREATE TABLE `ui_code_app_dic` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`app_name` varchar(255) DEFAULT '',
|
`app_name` varchar(255) CHARACTER SET utf8mb4 DEFAULT '',
|
||||||
`app_name_zh` varchar(255) DEFAULT NULL,
|
`app_name_zh` varchar(255) CHARACTER SET utf8mb4 DEFAULT '',
|
||||||
`view_code` varchar(255) DEFAULT '' COMMENT '应用编码',
|
`view_code` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '应用编码',
|
||||||
`icon` varchar(255) DEFAULT '',
|
`icon` varchar(255) DEFAULT '',
|
||||||
`behavior` varchar(255) DEFAULT '' COMMENT '行为细分',
|
`behavior` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '行为细分',
|
||||||
`core_app` int(11) DEFAULT NULL COMMENT '是否是核心应用(1:是,0:否)',
|
`core_app` int(11) DEFAULT NULL COMMENT '是否是核心应用(1:是,0:否)',
|
||||||
|
`app_service_id` int(10) unsigned zerofill DEFAULT NULL COMMENT '业务类型编号',
|
||||||
|
`app_service` varchar(255) CHARACTER SET utf8mb4 DEFAULT '',
|
||||||
|
`lib` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT 'lib类别',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=FEDERATED AUTO_INCREMENT=399 DEFAULT CHARSET=utf8 CONNECTION='mysql://root:111111@192.168.10.204:3306/gwall/code_app_dic';
|
) ENGINE=FEDERATED AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 CONNECTION='mysql://root:111111@192.168.10.204:3306/gwall/code_app_dic';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
35
pom.xml
35
pom.xml
@@ -33,6 +33,41 @@
|
|||||||
|
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.properties</include>
|
||||||
|
<include>**/*.xml</include>
|
||||||
|
<include>**/*.xsd</include>
|
||||||
|
<include>**/*.yml</include>
|
||||||
|
</includes>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/resources</directory>
|
||||||
|
<filtering>false</filtering>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.mmdb</include>
|
||||||
|
<include>**/*.dat</include>
|
||||||
|
<include>**/*.sh</include>
|
||||||
|
<include>**/*.bat</include>
|
||||||
|
<include>**/*.sql</include>
|
||||||
|
</includes>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/java</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.properties</include>
|
||||||
|
<include>**/*.xml</include>
|
||||||
|
</includes>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
|
||||||
|
</resources>
|
||||||
<plugins>
|
<plugins>
|
||||||
<!-- <plugin> -->
|
<!-- <plugin> -->
|
||||||
<!-- <groupId>org.mybatis.generator</groupId> -->
|
<!-- <groupId>org.mybatis.generator</groupId> -->
|
||||||
|
|||||||
@@ -12,25 +12,25 @@
|
|||||||
<result column="stat_time" jdbcType="TIMESTAMP" property="statTime" />
|
<result column="stat_time" jdbcType="TIMESTAMP" property="statTime" />
|
||||||
</resultMap> -->
|
</resultMap> -->
|
||||||
<!-- <select id="appChart" resultType="java.util.HashMap">
|
<!-- <select id="appChart" resultType="java.util.HashMap">
|
||||||
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
|
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 traffic_app_statistic
|
||||||
WHERE app_type !=0 and stat_time >= DATE_SUB(NOW(),INTERVAL 5 MINUTE)
|
WHERE app_type !=0 and stat_time >= DATE_SUB(NOW(),INTERVAL 5 MINUTE)
|
||||||
GROUP BY app_type order by count desc limit 0,10
|
GROUP BY app_type order by count desc limit 0,10
|
||||||
</select> -->
|
</select> -->
|
||||||
<!-- 获取最近时间并且有效 -->
|
<!-- 获取最近时间并且有效 -->
|
||||||
<select id="getMaxReportTime" resultType="com.nis.domain.restful.dashboard.NtcTotalReport">
|
<select id="getMaxReportTime" resultType="com.nis.domain.restful.dashboard.NtcTotalReport">
|
||||||
SELECT MAX(report_time) reportTime FROM galaxy.ntc_total_report
|
SELECT MAX(report_time) reportTime FROM ntc_total_report
|
||||||
</select>
|
</select>
|
||||||
<!-- 获取带宽最近时间并且有效 -->
|
<!-- 获取带宽最近时间并且有效 -->
|
||||||
<select id="getMaxRecvTime" resultType="java.util.HashMap">
|
<select id="getMaxRecvTime" resultType="java.util.HashMap">
|
||||||
SELECT MAX(stat_time) recvTime FROM galaxy.traffic_trans_statistic
|
SELECT MAX(stat_time) recvTime FROM traffic_trans_statistic
|
||||||
</select>
|
</select>
|
||||||
<select id="getTotalReportList" resultType="java.util.HashMap">
|
<select id="getTotalReportList" resultType="java.util.HashMap">
|
||||||
SELECT SUM(reject_num) rejectNum,SUM(monitor_num) monitorNum,SUM(c2s_pkt_num) c2sPktNum,SUM(s2c_pkt_num) s2cPktNum,SUM(c2s_byte_len) c2sByteLen,SUM(s2c_byte_len) s2cByteLen,SUM(new_uni_conn_num) newUniConnNum,SUM(live_conn_num) liveConnNum,
|
SELECT SUM(reject_num) rejectNum,SUM(monitor_num) monitorNum,SUM(c2s_pkt_num) c2sPktNum,SUM(s2c_pkt_num) s2cPktNum,SUM(c2s_byte_len) c2sByteLen,SUM(s2c_byte_len) s2cByteLen,SUM(new_uni_conn_num) newUniConnNum,SUM(live_conn_num) liveConnNum,
|
||||||
SUM(drop_conn_num) dropConnNum,SUM(loop_conn_num) loopConnNum FROM galaxy.ntc_total_report
|
SUM(drop_conn_num) dropConnNum,SUM(loop_conn_num) loopConnNum FROM ntc_total_report
|
||||||
where report_time = #{reportTime}
|
where report_time = #{reportTime}
|
||||||
</select>
|
</select>
|
||||||
<select id="getNetFlowPortInfoNew" resultType="java.util.HashMap">
|
<select id="getNetFlowPortInfoNew" resultType="java.util.HashMap">
|
||||||
SELECT IFNULL(SUM(c2s_byte_len),0) inoctets ,IFNULL(SUM(s2c_byte_len),0) outoctets FROM galaxy.traffic_trans_statistic
|
SELECT IFNULL(SUM(c2s_byte_len),0) inoctets ,IFNULL(SUM(s2c_byte_len),0) outoctets FROM traffic_trans_statistic
|
||||||
where stat_time = #{statTime}
|
where stat_time = #{statTime}
|
||||||
</select>
|
</select>
|
||||||
<!-- 获取上个时间段的数据 -->
|
<!-- 获取上个时间段的数据 -->
|
||||||
|
|||||||
@@ -17,10 +17,10 @@
|
|||||||
</sql>
|
</sql>
|
||||||
<!-- 查询最近时间 -->
|
<!-- 查询最近时间 -->
|
||||||
<select id="getMaxStatTime" resultType="com.nis.domain.restful.dashboard.TrafficAppStatistic">
|
<select id="getMaxStatTime" resultType="com.nis.domain.restful.dashboard.TrafficAppStatistic">
|
||||||
SELECT MAX(stat_time) statTime FROM galaxy.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 galaxy.traffic_app_statistic
|
SELECT app_type appType, SUM(link_num) 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>
|
||||||
|
|||||||
@@ -17,20 +17,20 @@
|
|||||||
</sql>
|
</sql>
|
||||||
<!-- 获取最近时间并且有效 -->
|
<!-- 获取最近时间并且有效 -->
|
||||||
<select id="getMaxStatTime" resultType="com.nis.domain.restful.dashboard.TrafficHttpStatistic">
|
<select id="getMaxStatTime" resultType="com.nis.domain.restful.dashboard.TrafficHttpStatistic">
|
||||||
SELECT MAX(stat_time) statTime FROM galaxy.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 t.stat_time statTime,SUM(link_num) count, IFNULL( website_service_id, 268435455 ) websiteServiceId
|
SELECT t.stat_time statTime,SUM(link_num) count, IFNULL( website_service_id, 268435455 ) websiteServiceId
|
||||||
FROM galaxy.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
|
||||||
where t.web_id!=0
|
where t.web_id!=0
|
||||||
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(link_num) count, IFNULL( topic_id, 268435455 ) topicId
|
SELECT SUM(link_num) count, IFNULL( topic_id, 268435455 ) topicId
|
||||||
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
|
||||||
where t.web_id!=0
|
where t.web_id!=0
|
||||||
@@ -38,23 +38,23 @@
|
|||||||
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(link_num) count FROM traffic_http_statistic t
|
SELECT SUM(link_num) 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
|
||||||
WHERE u.website_service_id=#{websiteServiceId}
|
WHERE u.website_service_id=#{websiteServiceId}
|
||||||
and stat_time = DATE_SUB(#{statTime},INTERVAL 5 MINUTE)
|
and stat_time = DATE_SUB(#{statTime},INTERVAL 5 MINUTE)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!--获取网站列表列表 -->
|
<!--获取网站列表列表 -->
|
||||||
<!-- <select id="websiteList" resultMap="BaseResultMap">
|
<!-- <select id="websiteList" resultMap="BaseResultMap">
|
||||||
SELECT web_id webId, (SUM(c2s_pkt_num)+SUM(s2c_pkt_num)+SUM(c2s_byte_len)+SUM(s2c_byte_len)) count FROM traffic_http_statistic
|
SELECT web_id webId, (SUM(c2s_pkt_num)+SUM(s2c_pkt_num)+SUM(c2s_byte_len)+SUM(s2c_byte_len)) count FROM traffic_http_statistic
|
||||||
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(link_num) count
|
SELECT web_id webId,SUM(link_num) count
|
||||||
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
|
||||||
where u.website_service_id=#{websiteServiceId}
|
where u.website_service_id=#{websiteServiceId}
|
||||||
@@ -62,8 +62,8 @@
|
|||||||
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(link_num) count
|
SELECT web_id webId,SUM(link_num) count
|
||||||
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
|
||||||
where u.topic_id=#{topicId}
|
where u.topic_id=#{topicId}
|
||||||
@@ -71,8 +71,8 @@
|
|||||||
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(link_num) count FROM traffic_http_statistic t
|
SELECT SUM(link_num) 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
|
||||||
where u.website_service_id=#{websiteServiceId}
|
where u.website_service_id=#{websiteServiceId}
|
||||||
|
|||||||
@@ -20,15 +20,15 @@
|
|||||||
<!-- <select id="getIpList" resultMap="BaseResultMap">
|
<!-- <select id="getIpList" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
<include refid="Base_Column_List"/>
|
<include refid="Base_Column_List"/>
|
||||||
from galaxy.traffic_ip_active_statistic
|
from traffic_ip_active_statistic
|
||||||
</select> -->
|
</select> -->
|
||||||
<!-- IP流量统计五分钟-->
|
<!-- IP流量统计五分钟-->
|
||||||
<select id="getMaxStatTime" resultType="com.nis.domain.restful.dashboard.TrafficIpActiveStatistic">
|
<select id="getMaxStatTime" resultType="com.nis.domain.restful.dashboard.TrafficIpActiveStatistic">
|
||||||
SELECT MAX(stat_time) statTime FROM galaxy.traffic_ip_active_statistic
|
SELECT MAX(stat_time) statTime FROM traffic_ip_active_statistic
|
||||||
</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 galaxy.traffic_ip_active_statistic
|
SELECT ip_addr ipAddr, SUM(link_num) 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>
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
</select>
|
</select>
|
||||||
<!-- IP流量统计一小时-->
|
<!-- IP流量统计一小时-->
|
||||||
<select id="ipActiveOneHour" resultType="java.util.HashMap">
|
<select id="ipActiveOneHour" resultType="java.util.HashMap">
|
||||||
SELECT ip_addr ipAddr,area_id areaId, link_num linkNum ,c2s_pkt_num c2sPktNum,s2c_pkt_num s2cPktNum,c2s_byte_len c2sByteLen,s2c_byte_len s2cByteLen,date_format(stat_time, '%Y-%m-%d %H:%i:%s') statTime FROM galaxy.traffic_ip_active_statistic
|
SELECT ip_addr ipAddr,area_id areaId, link_num linkNum ,c2s_pkt_num c2sPktNum,s2c_pkt_num s2cPktNum,c2s_byte_len c2sByteLen,s2c_byte_len s2cByteLen,date_format(stat_time, '%Y-%m-%d %H:%i:%s') statTime FROM traffic_ip_active_statistic
|
||||||
WHERE ip_addr=#{ipAddr}
|
WHERE ip_addr=#{ipAddr}
|
||||||
and stat_time > DATE_SUB(#{statTime},INTERVAL 1 HOUR)
|
and stat_time > DATE_SUB(#{statTime},INTERVAL 1 HOUR)
|
||||||
ORDER BY linkNum DESC LIMIT 1
|
ORDER BY linkNum DESC LIMIT 1
|
||||||
|
|||||||
@@ -11,17 +11,17 @@
|
|||||||
|
|
||||||
<!-- 获取最大时间 -->
|
<!-- 获取最大时间 -->
|
||||||
<select id="getMaxStatTime" resultMap="BaseResultMap">
|
<select id="getMaxStatTime" resultMap="BaseResultMap">
|
||||||
SELECT MAX(stat_time) statTime FROM galaxy.traffic_port_active_statistic
|
SELECT MAX(stat_time) statTime FROM traffic_port_active_statistic
|
||||||
</select>
|
</select>
|
||||||
<!-- 获取当前时间五分钟数据 -->
|
<!-- 获取当前时间五分钟数据 -->
|
||||||
<select id="getPortActiveList" resultMap="BaseResultMap">
|
<select id="getPortActiveList" resultMap="BaseResultMap">
|
||||||
SELECT port ,SUM(sum) sum from galaxy.traffic_port_active_statistic
|
SELECT port ,SUM(sum) sum from traffic_port_active_statistic
|
||||||
WHERE stat_time = #{statTime}
|
WHERE stat_time = #{statTime}
|
||||||
GROUP BY port order by sum desc limit 0,10
|
GROUP BY port order by sum desc limit 0,10
|
||||||
</select>
|
</select>
|
||||||
<!-- 获取上个时间段的数据 -->
|
<!-- 获取上个时间段的数据 -->
|
||||||
<select id="getPortActiveOld" resultMap="BaseResultMap">
|
<select id="getPortActiveOld" resultMap="BaseResultMap">
|
||||||
SELECT SUM(sum) sum from galaxy.traffic_port_active_statistic
|
SELECT SUM(sum) sum from traffic_port_active_statistic
|
||||||
WHERE port=#{port} and stat_time = DATE_SUB(#{statTime},INTERVAL 5 MINUTE)
|
WHERE port=#{port} and stat_time = DATE_SUB(#{statTime},INTERVAL 5 MINUTE)
|
||||||
GROUP BY port ORDER BY sum DESC limit 0,10
|
GROUP BY port ORDER BY sum DESC limit 0,10
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -17,10 +17,10 @@
|
|||||||
</sql>
|
</sql>
|
||||||
<!-- 获取最近时间 -->
|
<!-- 获取最近时间 -->
|
||||||
<select id="getMaxStatTime" resultType="com.nis.domain.restful.dashboard.TrafficProtocolStatistic">
|
<select id="getMaxStatTime" resultType="com.nis.domain.restful.dashboard.TrafficProtocolStatistic">
|
||||||
SELECT MAX(stat_time) statTime FROM galaxy.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 galaxy.traffic_protocol_statistic WHERE proto_type != 0
|
SELECT proto_type protoType, SUM(link_num) 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>
|
||||||
@@ -18,29 +18,29 @@
|
|||||||
</sql>
|
</sql>
|
||||||
<!-- 获取最近时间并且有效 -->
|
<!-- 获取最近时间并且有效 -->
|
||||||
<select id="getMaxStatTime" resultType="com.nis.domain.restful.dashboard.TrafficUaStatistic">
|
<select id="getMaxStatTime" resultType="com.nis.domain.restful.dashboard.TrafficUaStatistic">
|
||||||
SELECT MAX(stat_time) statTime FROM galaxy.traffic_ua_statistic WHERE os_type !=0 and bs_type!=0
|
SELECT MAX(stat_time) statTime FROM traffic_ua_statistic WHERE os_type !=0 and bs_type!=0
|
||||||
</select>
|
</select>
|
||||||
<!--获取操作系统列表TOP10 -->
|
<!--获取操作系统列表TOP10 -->
|
||||||
<select id="systemList" resultMap="BaseResultMap">
|
<select id="systemList" resultMap="BaseResultMap">
|
||||||
SELECT os_type osType, SUM(link_num) count FROM galaxy.traffic_ua_statistic
|
SELECT os_type osType, SUM(link_num) 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 galaxy.traffic_ua_statistic
|
SELECT SUM(link_num) 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 galaxy.traffic_ua_statistic
|
SELECT bs_type bsType, SUM(link_num) 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 galaxy.traffic_ua_statistic
|
SELECT SUM(link_num) 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 os_type not in
|
and os_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 galaxy.traffic_ua_statistic
|
SELECT bs_type bsType, SUM(link_num) 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 galaxy.traffic_ua_statistic
|
SELECT SUM(link_num) 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 galaxy.traffic_ua_statistic
|
SELECT os_type osType, SUM(link_num) 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 galaxy.traffic_ua_statistic
|
SELECT SUM(link_num) 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 bs_type not in
|
and bs_type not in
|
||||||
|
|||||||
Reference in New Issue
Block a user