合并代码

This commit is contained in:
renkaige
2019-01-07 10:19:40 +06:00
parent 44de9e1f25
commit a8b9ffc219
12 changed files with 583 additions and 1 deletions

View File

@@ -1523,6 +1523,15 @@
<result column="c2s_byte_num" jdbcType="VARCHAR" property="c2sByteNum" />
<result column="s2c_byte_num" jdbcType="VARCHAR" property="s2cByteNum" />
<result column="proto_id" jdbcType="BIGINT" property="protoId" />
<result column="app_id" jdbcType="BIGINT" property="appId" />
<result column="web_id" jdbcType="BIGINT" property="webId" />
<!--
<result column="os_id" jdbcType="BIGINT" property="osId" />
<result column="bs_id" jdbcType="BIGINT" property="bsId" />
<result column="behav_id" jdbcType="BIGINT" property="behavId" />
-->
</resultMap>
</mapper>

View File

@@ -5,7 +5,8 @@ import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.nis.domain.restful.dashboard.AppConnRecordStatistic;
import com.nis.domain.restful.dashboard.TrafficAppFocusStatistic;
import com.nis.domain.restful.dashboard.TrafficAppStatistic;
import com.nis.web.dao.MyBatisDao;
@MyBatisDao
@@ -14,4 +15,6 @@ public interface TrafficAppStatisticDao {
TrafficAppStatistic getMaxStatTime();
List<Map> appChart(@Param("statTime")Date statTime);
List<Map> getAppList(@Param("beginTime")String beginTime,@Param("endTime")String endTime,@Param("appType")Integer[] appType);
List<TrafficAppFocusStatistic> getAppTrend(TrafficAppFocusStatistic entity);
List<AppConnRecordStatistic> appConnRecordTop100(AppConnRecordStatistic entity);
}

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>