优化动作,网站流量详情接口算法,动作增加drop,loop

This commit is contained in:
zhanghongqing
2018-12-23 18:09:29 +08:00
parent 27b18c9901
commit 8c7d1124a6
5 changed files with 251 additions and 120 deletions

View File

@@ -128,7 +128,7 @@
</select> -->
<!-- entrance 1,2 ,动作为阻断,近一小时 间隔5分钟数据 -->
<select id="getActionTrans" resultType="com.nis.domain.restful.NtcEntranceReport">
select sum(sum) sum,report_time time from ntc_entrance_report r where
select sum(sum) sum,report_time reportTime from ntc_entrance_report r where
<![CDATA[${serviceSql} and report_time<=#{endDate} and report_time>=#{beginDate}]]>
and entrance_id=#{entranceId}
group by report_time order by report_time

View File

@@ -125,7 +125,7 @@ FROM
<select id="getTrafficHttpDomain" resultType="java.util.HashMap">
select web_id webId, max(unique_num) uniqueNum,entrance_id entranceId,SUM(c2s_byte_len + s2c_byte_len) byteCount,
sum(c2s_pkt_num + s2c_pkt_num) pktCount from traffic_http_focus_statistic t where
<![CDATA[ stat_time>= #{beginDate} and stat_time< #{endDate}]]>
<![CDATA[ stat_time> #{beginDate} and stat_time<= #{endDate}]]>
<if test="domain!=null">
and web_id in
<foreach collection="domain" index="index" item="item" open="(" separator="," close=")">
@@ -138,7 +138,7 @@ FROM
group by web_id order by unique_num
</select>
<select id="getDomainTrans" resultType="com.nis.domain.restful.dashboard.TrafficHttpFocusStatistic">
select stat_time time, max(unique_num)count from traffic_http_focus_statistic t where
select stat_time statTime, max(unique_num)count from traffic_http_focus_statistic t where
<![CDATA[ stat_time>= #{beginDate} and stat_time< #{endDate}]]>
and web_id=#{domain}
<if test="entranceId!=null">