traffic新增接口
This commit is contained in:
@@ -17,7 +17,10 @@ public interface NtcTotalReportDao {
|
||||
List<Map> getTotalReportList(@Param("reportTime") Date reportTime);
|
||||
List<Map> getNetFlowPortInfoNew(@Param("statTime") Date statTime);
|
||||
List<TrafficTransStatistic> getBandwidthTrans(@Param("entranceId") Integer entranceId,@Param("beginDate") String beginDate,@Param("endDate") String endDate,@Param("addrType") String addrType,@Param("transType") Integer transType);
|
||||
|
||||
String getAddrType();
|
||||
String getTransType();
|
||||
String getEntranceId();
|
||||
List<TrafficTransStatistic> getBandwidthTrans2(@Param("beginDate") String beginDate,@Param("endDate") String endDate);
|
||||
Map getEntranceMaxReportTime();
|
||||
List<NtcEntranceReport> getActionTrans(@Param("beginDate") String beginDate,@Param("endDate") String endDate ,@Param("entranceId") Integer entranceId,@Param("serviceSql") String serviceSql);
|
||||
}
|
||||
@@ -82,8 +82,24 @@
|
||||
and entrance_id=#{entranceId}
|
||||
group by stat_time order by stat_time
|
||||
</select>
|
||||
<!-- 获取近一小时的带宽根据ip46,协议 tcp,udp变化 -->
|
||||
<select id="getBandwidthTrans2" resultMap="BandwidthResultMap">
|
||||
select addr_type,trans_type,entrance_id,IFNULL((SUM(c2s_byte_len+s2c_byte_len)*8)/300/1024/1024/1024,0) gbps,IFNULL(SUM(c2s_pkt_num+s2c_pkt_num)/300,0) pps,IFNULL(SUM(link_num),0) linkNum, stat_time time from traffic_trans_statistic
|
||||
where <![CDATA[stat_time<=#{endDate} and stat_time>=#{beginDate}]]>
|
||||
and addr_type !=0
|
||||
and trans_type!=0
|
||||
group by stat_time,addr_type,trans_type order by stat_time
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getAddrType" resultType="String">
|
||||
SELECT GROUP_CONCAT(DISTINCT addr_type) FROM traffic_trans_statistic where addr_type!=0
|
||||
</select>
|
||||
<select id="getTransType" resultType="String">
|
||||
SELECT GROUP_CONCAT(DISTINCT trans_type) FROM traffic_trans_statistic where trans_type!=0
|
||||
</select>
|
||||
<select id="getEntranceId" resultType="String">
|
||||
SELECT GROUP_CONCAT(DISTINCT entrance_id) FROM traffic_trans_statistic where entrance_id!=0
|
||||
</select>
|
||||
<!-- 获取报表最近时间 -->
|
||||
<select id="getEntranceMaxReportTime" resultType="java.util.HashMap">
|
||||
SELECT report_time reportTime FROM ntc_entrance_report order by report_time desc limit 1
|
||||
|
||||
Reference in New Issue
Block a user