summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzhangdongxu <[email protected]>2019-01-16 18:33:21 +0800
committerzhangdongxu <[email protected]>2019-01-16 18:33:21 +0800
commitd368dcf7811b4643f8edae136a1deeb2cf4b317c (patch)
tree2fcf13d964c93cf326ced23a2753c42772499f64 /src
parent01b97a7f2de8f79b5d4d50adec730acc91979c73 (diff)
parent02ee1ef680db80055ab1bf9c64ae308ee6eaa6b5 (diff)
Merge branch 'develop' of https://git.mesalab.cn/galaxy/galaxy-service.git into develop
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/nis/web/dao/dashboard/NtcTotalReportDao.xml12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/com/nis/web/dao/dashboard/NtcTotalReportDao.xml b/src/main/java/com/nis/web/dao/dashboard/NtcTotalReportDao.xml
index bf50e8b..2b90249 100644
--- a/src/main/java/com/nis/web/dao/dashboard/NtcTotalReportDao.xml
+++ b/src/main/java/com/nis/web/dao/dashboard/NtcTotalReportDao.xml
@@ -31,15 +31,15 @@
SELECT stat_time statTime FROM traffic_trans_statistic order by stat_time desc limit 1
</select>
<!-- 根据最近时间条获取带宽,进出口流量 -->
- <select id="getNetFlowPortInfoNew" resultType="java.util.HashMap">
- SELECT SUM(total_traffic.inoctets) AS inoctets ,SUM(total_traffic.outoctets) AS outoctets FROM (
+ <select id="getNetFlowPortInfoNew" resultType="java.util.HashMap">
+ SELECT SUM(total_traffic.inoctets) AS inoctets ,SUM(total_traffic.outoctets) AS outoctets FROM (
SELECT IFNULL(SUM(c2s_byte_len),0) inoctets ,IFNULL(SUM(s2c_byte_len),0) outoctets FROM traffic_trans_statistic
- where stat_time = (SELECT stat_time FROM traffic_trans_statistic WHERE entrance_id=1 ORDER BY stat_time DESC LIMIT 0,1) and entrance_id=1
+ where stat_time = (SELECT stat_time FROM traffic_trans_statistic WHERE entrance_id=1 and stat_time > DATE_SUB(now(), INTERVAL 15 MINUTE) ORDER BY stat_time DESC LIMIT 0,1) and entrance_id=1
UNION ALL
SELECT IFNULL(SUM(c2s_byte_len),0) inoctets ,IFNULL(SUM(s2c_byte_len),0) outoctets FROM traffic_trans_statistic
- where stat_time = (SELECT stat_time FROM traffic_trans_statistic WHERE entrance_id=2 ORDER BY stat_time DESC LIMIT 0,1) and entrance_id=2
- ) total_traffic
- </select>
+ where stat_time = (SELECT stat_time FROM traffic_trans_statistic WHERE entrance_id=2 and stat_time > DATE_SUB(now(), INTERVAL 15 MINUTE) ORDER BY stat_time DESC LIMIT 0,1) and entrance_id=2
+ ) total_traffic
+ </select>
<!-- 获取近五分钟的带宽根据ip46,协议 tcp,udp变化 -->
<!-- <select id="getBandwidthTrans" resultMap="BandwidthResultMap">
select IFNULL(p.gbps,0) gbps,IFNULL(p.pps,0) pps,IFNULL(p.sumNum,0) linkNum, date_format(a.min5,'%Y-%m-%d %H:%i') time from