优化平台ppoe和非平台ppoe配置方式的虚拟网卡上报带宽值处理.
优化pppoe虚拟网卡处理逻辑
This commit is contained in:
+27
-2
@@ -25,10 +25,11 @@
|
||||
<result property="bindIp" column="bind_ip" />
|
||||
<result property="newFlag" column="new_flag" />
|
||||
<result property="status" column="status" />
|
||||
<result property="bandwidthResult" column="bandwidth_result" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRmNetworkInterfaceChildVo">
|
||||
select id, client_id, parent_interface, isp, province, city, public_ip, interface_name, mac_address, interface_type, ipv4_address, ipv6_address, gateway, create_time, update_time, create_by, update_by, bind_ip, new_flag, status from rm_network_interface_child
|
||||
select id, client_id, parent_interface, isp, province, city, public_ip, interface_name, mac_address, interface_type, ipv4_address, ipv6_address, gateway, create_time, update_time, create_by, update_by, bind_ip, new_flag, status, bandwidth_result from rm_network_interface_child
|
||||
</sql>
|
||||
|
||||
<select id="selectRmNetworkInterfaceChildList" parameterType="RmNetworkInterfaceChild" resultMap="RmNetworkInterfaceChildResult">
|
||||
@@ -49,6 +50,7 @@
|
||||
<if test="bindIp != null and bindIp != ''"> and bind_ip = #{bindIp}</if>
|
||||
<if test="newFlag != null "> and new_flag = #{newFlag}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="ipv4Flag">and ipv4_address != '' and ipv4_address != 'N/A'</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -58,7 +60,7 @@
|
||||
</select>
|
||||
|
||||
<insert id="insertRmNetworkInterfaceChild" parameterType="RmNetworkInterfaceChild" useGeneratedKeys="true" keyProperty="id">
|
||||
insert IGNORE into rm_network_interface_child
|
||||
insert into rm_network_interface_child
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null">client_id,</if>
|
||||
<if test="parentInterface != null">parent_interface,</if>
|
||||
@@ -79,6 +81,7 @@
|
||||
<if test="bindIp != null">bind_ip,</if>
|
||||
<if test="newFlag != null">new_flag,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="bandwidthResult != null">bandwidth_result,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clientId != null">#{clientId},</if>
|
||||
@@ -100,6 +103,24 @@
|
||||
<if test="bindIp != null">#{bindIp},</if>
|
||||
<if test="newFlag != null">#{newFlag},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="bandwidthResult != null">#{bandwidthResult},</if>
|
||||
</trim>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
<trim suffixOverrides=",">
|
||||
<if test="isp != null">isp = #{isp},</if>
|
||||
<if test="province != null">province = #{province},</if>
|
||||
<if test="city != null">city = #{city},</if>
|
||||
<if test="publicIp != null">public_ip = #{publicIp},</if>
|
||||
<if test="interfaceName != null">interface_name = #{interfaceName},</if>
|
||||
<if test="macAddress != null">mac_address = #{macAddress},</if>
|
||||
<if test="interfaceType != null">interface_type = #{interfaceType},</if>
|
||||
<if test="ipv4Address != null">ipv4_address = #{ipv4Address},</if>
|
||||
<if test="ipv6Address != null">ipv6_address = #{ipv6Address},</if>
|
||||
<if test="gateway != null">gateway = #{gateway},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="bandwidthResult != null">bandwidth_result = #{bandwidthResult},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -125,6 +146,7 @@
|
||||
<if test="bindIp != null">bind_ip = #{bindIp},</if>
|
||||
<if test="newFlag != null">new_flag = #{newFlag},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="bandwidthResult != null">bandwidth_result = #{bandwidthResult},</if>
|
||||
</trim>
|
||||
<where>
|
||||
<choose>
|
||||
@@ -154,4 +176,7 @@
|
||||
<delete id="deleteRmNetworkInterfaceChildByClientId" parameterType="String">
|
||||
delete from rm_network_interface_child where client_id = #{clientId}
|
||||
</delete>
|
||||
<delete id="deleteByParentInterfaceName" parameterType="String">
|
||||
delete from rm_network_interface_child where client_id = #{clientId} and parent_interface =#{name}
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -170,6 +170,7 @@
|
||||
city = #{city},
|
||||
public_ip = #{publicIp},
|
||||
interface_name = #{interfaceName},
|
||||
gateway = #{gateway},
|
||||
interface_type = #{interfaceType},
|
||||
ipv4_address = #{ipv4Address},
|
||||
ipv6_address = #{ipv6Address},
|
||||
|
||||
@@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
a.ipv4_address ipv4Address,
|
||||
a.ipv4_mask_bits ipv4MaskBits,
|
||||
a.ipv4_gateway ipv4Gateway,
|
||||
a.bandwidth_result bandwidthResult,
|
||||
a.create_time createTime,
|
||||
a.update_time updateTime,
|
||||
a.create_by createBy,
|
||||
|
||||
Reference in New Issue
Block a user