App统计图增加功能:添加app趋势详情和App通联关系Top100 数据查询接口

This commit is contained in:
zhangdongxu
2019-01-05 17:21:07 +08:00
parent 76f3808a84
commit 66b92f37d2
7 changed files with 375 additions and 1 deletions

View File

@@ -42,4 +42,29 @@
GROUP BY app_type ) p
LEFT JOIN ui_code_app_dic c ON p.app_type=c.view_code ORDER BY p.GByte DESC
</select>
<!-- App 趋势详情 -->
<select id="getAppTrend" parameterType="com.nis.domain.restful.dashboard.TrafficAppFocusStatistic" resultType="com.nis.domain.restful.dashboard.TrafficAppFocusStatistic">
select stat_time time, max(unique_sip_num) sipNum,max(unique_dip_num) dipNum from traffic_app_focus_statistic t where
<![CDATA[ stat_time>= toDateTime(#{searchStartTime}) and stat_time< toDateTime(#{searchEndTime})
and app_id=toInt64(#{searchAppId}) ]]>
<if test="searchEntranceId">
<![CDATA[and entrance_id=toInt64(#{searchEntranceId}) ]]>
</if>
group by stat_time
order by stat_time
</select>
<!-- App通联关系Top100 -->
<select id="appConnRecordTop100" parameterType="com.nis.domain.restful.dashboard.AppConnRecordStatistic" resultType="com.nis.domain.restful.dashboard.AppConnRecordStatistic">
select found_time,s_ip ipAddr, sum(c2s_byte_num + s2c_byte_num) byteNum, sum(c2s_pkt_num + s2c_pkt_num) pktNum, count(found_time) logNum
from tbs_ods_ntc_conn_record_log t where
<![CDATA[ found_time>= toDateTime(#{searchStartTime}) and found_time< toDateTime(#{searchEndTime})
and app_id=toInt64(#{searchAppId}) ]]>
<if test="searchEntranceId">
<![CDATA[and entrance_id=toInt64(#{searchEntranceId}) ]]>
</if>
group by found_time,s_ip
order by logNum limit 100
</select>
</mapper>