增加流量重试入库功能
This commit is contained in:
+8
-1
@@ -223,5 +223,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="endTime != null and endTime != ''"> and create_time <= #{endTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="countByClientIdAndTime" parameterType="InitialBandwidthTraffic" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from ${tableName}
|
||||
<where>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="startTime != null"> and create_time = #{startTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
+51
-1
@@ -59,7 +59,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="createTime != null"> and create_time = #{createTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectInitialBandwidthTrafficRecoverTempList" parameterType="InitialBandwidthTrafficTemp" resultMap="InitialBandwidthTrafficTempResult">
|
||||
select id, name, mac, status, type, ipV4, in_dropped, out_dropped, in_speed, out_speed,
|
||||
speed, duplex, create_time, update_time, create_by, update_by, client_id, total_in_speed,
|
||||
total_out_speed, ipv4_in_speed, ipv4_out_speed, ipv6_in_speed, ipv6_out_speed, total_ipv4_in_speed,
|
||||
total_ipv4_out_speed, total_ipv6_in_speed, total_ipv6_out_speed, ipV6
|
||||
from initial_bandwidth_traffic_recover_temp
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="mac != null and mac != ''"> and mac = #{mac}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="ipV4 != null and ipV4 != ''"> and ipV4 = #{ipV4}</if>
|
||||
<if test="inDropped != null "> and in_dropped = #{inDropped}</if>
|
||||
<if test="outDropped != null "> and out_dropped = #{outDropped}</if>
|
||||
<if test="inSpeed != null and inSpeed != ''"> and in_speed = #{inSpeed}</if>
|
||||
<if test="outSpeed != null and outSpeed != ''"> and out_speed = #{outSpeed}</if>
|
||||
<if test="speed != null and speed != ''"> and speed = #{speed}</if>
|
||||
<if test="duplex != null and duplex != ''"> and duplex = #{duplex}</if>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="totalInSpeed != null and totalInSpeed != ''"> and total_in_speed = #{totalInSpeed}</if>
|
||||
<if test="totalOutSpeed != null and totalOutSpeed != ''"> and total_out_speed = #{totalOutSpeed}</if>
|
||||
<if test="createTime != null"> and create_time = #{createTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectInitialBandwidthTrafficTempById" parameterType="Long" resultMap="InitialBandwidthTrafficTempResult">
|
||||
<include refid="selectInitialBandwidthTrafficTempVo"/>
|
||||
where id = #{id}
|
||||
@@ -174,6 +197,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<delete id="deleteTempMsgByClientId" parameterType="String">
|
||||
delete from initial_bandwidth_traffic_temp where client_id = #{clientId}
|
||||
</delete>
|
||||
<delete id="deleteTempMsgByClientIdAndTime" parameterType="InitialBandwidthTrafficTemp">
|
||||
delete from initial_bandwidth_traffic_recover_temp where client_id = #{clientId} and create_time=#{createTime}
|
||||
</delete>
|
||||
|
||||
<insert id="batchInsertServerTemp" parameterType="java.util.List">
|
||||
insert IGNORE into initial_bandwidth_traffic_temp
|
||||
@@ -199,4 +225,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertServerRecoverTemp" parameterType="java.util.List">
|
||||
insert IGNORE into initial_bandwidth_traffic_recover_temp
|
||||
(
|
||||
name, mac, status, type, ipV4, in_dropped, out_dropped,
|
||||
in_speed, out_speed, speed, duplex, create_time, update_time,
|
||||
create_by, update_by, client_id, total_in_speed, total_out_speed,
|
||||
ipv4_in_speed, ipv4_out_speed, ipv6_in_speed, ipv6_out_speed,
|
||||
total_ipv4_in_speed, total_ipv4_out_speed, total_ipv6_in_speed, total_ipv6_out_speed,
|
||||
ipV6
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" index="index" separator=",">
|
||||
(
|
||||
#{item.name}, #{item.mac}, #{item.status}, #{item.type}, #{item.ipV4},
|
||||
#{item.inDropped}, #{item.outDropped}, #{item.inSpeed}, #{item.outSpeed},
|
||||
#{item.speed}, #{item.duplex}, #{item.createTime}, #{item.updateTime},
|
||||
#{item.createBy}, #{item.updateBy}, #{item.clientId}, #{item.totalInSpeed},
|
||||
#{item.totalOutSpeed},
|
||||
#{item.ipv4InSpeed}, #{item.ipv4OutSpeed}, #{item.ipv6InSpeed}, #{item.ipv6OutSpeed},
|
||||
#{item.totalIpv4InSpeed}, #{item.totalIpv4OutSpeed}, #{item.totalIpv6InSpeed}, #{item.totalIpv6OutSpeed},
|
||||
#{item.ipV6}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user