增加计算服务器平均流量方法、优化95值自动计算方法
This commit is contained in:
+14
-6
@@ -107,28 +107,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<insert id="insert" parameterType="InitialBandwidthTraffic">
|
||||
INSERT INTO ${tableName} (
|
||||
`name`, `mac`, `status`, `type`, ipV4, `in_dropped`, `out_dropped`,
|
||||
`in_speed`, `out_speed`, duplex, speed, create_by, update_by, client_id, create_time
|
||||
`in_speed`, `out_speed`, `total_in_speed`, `total_out_speed`, duplex, speed,
|
||||
create_by, update_by, client_id, create_time
|
||||
) VALUES (
|
||||
#{name}, #{mac}, #{status}, #{type}, #{ipV4}, #{inDropped}, #{outDropped},
|
||||
#{inSpeed}, #{outSpeed}, #{duplex}, #{speed}, #{createBy}, #{updateBy}, #{clientId}, #{createTime}
|
||||
#{inSpeed}, #{outSpeed}, #{totalInSpeed}, #{totalOutSpeed}, #{duplex}, #{speed},
|
||||
#{createBy}, #{updateBy}, #{clientId}, #{createTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="batchInsert" parameterType="InitialBandwidthTraffic">
|
||||
INSERT IGNORE INTO ${tableName} (
|
||||
`name`, `mac`, `status`, `type`, ipV4, `in_dropped`, `out_dropped`,
|
||||
`in_speed`, `out_speed`,duplex, speed, create_by, update_by, client_id, create_time
|
||||
`in_speed`, `out_speed`, `total_in_speed`, `total_out_speed`, duplex, speed,
|
||||
create_by, update_by, client_id, create_time
|
||||
) VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.name}, #{item.mac}, #{item.status}, #{item.type}, #{item.ipV4}, #{item.inDropped}, #{item.outDropped},
|
||||
#{item.inSpeed}, #{item.outSpeed}, #{item.duplex}, #{item.speed}, #{item.createBy}, #{item.updateBy}, #{item.clientId}, #{item.createTime}
|
||||
#{item.inSpeed}, #{item.outSpeed}, #{item.totalInSpeed}, #{item.totalOutSpeed}, #{item.duplex}, #{item.speed},
|
||||
#{item.createBy}, #{item.updateBy}, #{item.clientId}, #{item.createTime}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="getNetInterfaceDetailsMsg" parameterType="InitialBandwidthTraffic" resultMap="InitialBandwidthTrafficResult">
|
||||
select id, `name`, mac, status, `type`, ipV4, in_dropped, out_dropped, in_speed, out_speed,
|
||||
create_time, update_time, create_by, update_by, client_id, duplex, speed
|
||||
total_in_speed, total_out_speed, create_time, update_time, create_by, update_by,
|
||||
client_id, duplex, speed
|
||||
from ${tableName}
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
@@ -137,9 +143,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
order by create_time desc
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="getNetTrafficList" parameterType="InitialBandwidthTraffic" resultMap="InitialBandwidthTrafficResult">
|
||||
select id, `name`, mac, status, `type`, ipV4, in_dropped, out_dropped, in_speed, out_speed,
|
||||
create_time, update_time, create_by, update_by, client_id, duplex, speed
|
||||
total_in_speed, total_out_speed, create_time, update_time, create_by, update_by,
|
||||
client_id, duplex, speed
|
||||
from ${tableName}
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
|
||||
Reference in New Issue
Block a user