相关接口增加ipv4、ipv6出入流量字段。
服务器管理列表新增字段和排序。 优化监控看板流量统计。
This commit is contained in:
+17
-14
@@ -430,32 +430,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="getTrafficListByClientIds" resultType="EpsInitialTrafficData">
|
||||
SELECT
|
||||
CAST(sum(ifnull(in_speed,0)) AS DECIMAL(20,0)) AS inSpeed,
|
||||
CAST(sum(ifnull(out_speed,0)) AS DECIMAL(20,0)) AS outSpeed,
|
||||
CAST(sum(ifnull(ipv4_in_speed,0)) AS DECIMAL(20,0)) AS ipv4InSpeed,
|
||||
CAST(sum(ifnull(ipv4_out_speed,0)) AS DECIMAL(20,0)) AS ipv4OutSpeed,
|
||||
CAST(sum(ifnull(ipv6_in_speed,0)) AS DECIMAL(20,0)) AS ipv6InSpeed,
|
||||
CAST(sum(ifnull(ipv6_out_speed,0)) AS DECIMAL(20,0)) AS ipv6OutSpeed,
|
||||
create_time AS createTime
|
||||
FROM ${tableName}
|
||||
CAST(sum(ifnull(a.in_speed,0)) AS DECIMAL(20,0)) AS inSpeed,
|
||||
CAST(sum(ifnull(a.out_speed,0)) AS DECIMAL(20,0)) AS outSpeed,
|
||||
CAST(sum(ifnull(a.ipv4_in_speed,0)) AS DECIMAL(20,0)) AS ipv4InSpeed,
|
||||
CAST(sum(ifnull(a.ipv4_out_speed,0)) AS DECIMAL(20,0)) AS ipv4OutSpeed,
|
||||
CAST(sum(ifnull(a.ipv6_in_speed,0)) AS DECIMAL(20,0)) AS ipv6InSpeed,
|
||||
CAST(sum(ifnull(a.ipv6_out_speed,0)) AS DECIMAL(20,0)) AS ipv6OutSpeed,
|
||||
a.create_time AS createTime
|
||||
FROM ${tableName} a
|
||||
INNER JOIN rm_network_interface b ON a.client_id = b.client_id and a.mac = b.mac_address
|
||||
AND (b.bind_ip = 1 OR b.bind_ip = 3)
|
||||
AND b.new_flag = 1
|
||||
<where>
|
||||
<if test="businessId != '' and businessId != null">
|
||||
and business_id = #{businessId}
|
||||
and a.business_id = #{businessId}
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
and create_time >= #{startTime}
|
||||
and a.create_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
and create_time <= #{endTime}
|
||||
and a.create_time <= #{endTime}
|
||||
</if>
|
||||
<if test="clientIds != null">
|
||||
and client_id in
|
||||
and a.client_id in
|
||||
<foreach collection="clientIds.split(',')" item="clientId" open="(" separator="," close=")">
|
||||
#{clientId}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
group by create_time
|
||||
ORDER BY out_speed desc
|
||||
group by a.create_time
|
||||
ORDER BY outSpeed desc
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user