流量统计app.协议。域名增加多条件查询,主题统计series中算法第二级数据增加排序功能,保证界面数据规律排序
This commit is contained in:
@@ -13,5 +13,5 @@ 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<Map> getAppList(@Param("beginTime")String beginTime,@Param("endTime")String endTime,@Param("appType")Integer[] appType);
|
||||
}
|
||||
@@ -32,11 +32,12 @@
|
||||
SELECT app_type,SUM(link_num) AS link_num,SUM(c2s_pkt_num+s2c_pkt_num) AS packets,
|
||||
((SUM(c2s_byte_len+s2c_byte_len)*8)/300/1024/1024/1024) AS GByte
|
||||
FROM traffic_app_statistic WHERE
|
||||
<if test="beginTime!=null and endTime!=null">
|
||||
stat_time >= #{beginTime} and stat_time <= #{endTime}
|
||||
</if>
|
||||
<if test="appType!=null and appType!=''">
|
||||
and app_type=#{appType}
|
||||
<![CDATA[ stat_time>= #{beginTime} and stat_time<= #{endTime}]]>
|
||||
<if test="appType!=null">
|
||||
and app_type in
|
||||
<foreach collection="appType" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY app_type ) p
|
||||
LEFT JOIN ui_code_app_dic c ON p.app_type=c.view_code ORDER BY p.GByte DESC
|
||||
|
||||
@@ -29,7 +29,7 @@ public interface TrafficHttpStatisticDao {
|
||||
List<Map> getTrafficHttpStatistic(@Param("statTime") Date statTime, @Param("endTime") Date endTime);
|
||||
List getIdByWebSiteId(@Param("websiteId") Integer websiteId);
|
||||
|
||||
List<Map> getTrafficHttpDomain(@Param("beginDate")Date beginDate,@Param("endDate") Date endDate,@Param("domain")Integer domain,@Param("entranceId")Integer entranceId);
|
||||
List<Map> getTrafficHttpDomain(@Param("beginDate")Date beginDate,@Param("endDate") Date endDate,@Param("domain")Integer[] domain,@Param("entranceId")Integer entranceId);
|
||||
List<TrafficHttpFocusStatistic> getDomainTrans(@Param("entranceId")Integer entranceId,@Param("beginDate")String beginDate,@Param("endDate")String endDate,@Param("domain")Integer domain);
|
||||
|
||||
}
|
||||
@@ -127,7 +127,10 @@ FROM
|
||||
sum(c2s_pkt_num + s2c_pkt_num) pktCount from traffic_http_focus_statistic t where
|
||||
<![CDATA[ stat_time>= #{beginDate} and stat_time< #{endDate}]]>
|
||||
<if test="domain!=null">
|
||||
and web_id=#{domain}
|
||||
and web_id in
|
||||
<foreach collection="domain" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="entranceId!=null">
|
||||
and entrance_id=#{entranceId}
|
||||
|
||||
@@ -13,5 +13,6 @@ public interface TrafficProtocolStatisticDao {
|
||||
|
||||
TrafficProtocolStatistic getMaxStatTime();
|
||||
List<Map> protocolChart(@Param("statTime")Date statTime);
|
||||
List<Map> getProtocolList(@Param("statTime")Date statTime,@Param("beginTime")String beginTime,@Param("endTime")String endTime);
|
||||
List<Map> getProtocolList(@Param("beginTime")String beginTime,@Param("endTime")String endTime,@Param("protoType")Integer[] protoType);
|
||||
|
||||
}
|
||||
@@ -29,11 +29,12 @@
|
||||
SELECT proto_type,SUM(link_num) AS link_num,SUM(c2s_pkt_num+s2c_pkt_num) AS packets,
|
||||
((SUM(c2s_byte_len+s2c_byte_len)*8)/300/1024/1024/1024) AS GByte
|
||||
FROM traffic_protocol_statistic WHERE
|
||||
<if test="beginTime==null or endTime==null">
|
||||
stat_time > DATE_SUB(#{statTime},INTERVAL 1 HOUR)
|
||||
</if>
|
||||
<if test="beginTime!=null and endTime!=null">
|
||||
stat_time >= #{beginTime} and stat_time <= #{endTime}
|
||||
<![CDATA[ stat_time>= #{beginTime} and stat_time<= #{endTime}]]>
|
||||
<if test="protoType!=null">
|
||||
and proto_type in
|
||||
<foreach collection="protoType" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY proto_type ) p
|
||||
LEFT JOIN ui_code_protocol_type_dic c ON p.proto_type=c.view_code ORDER BY p.GByte DESC
|
||||
|
||||
Reference in New Issue
Block a user