获取最新策略增加路由信息方法、交换机带宽收益
This commit is contained in:
+3
-6
@@ -196,7 +196,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 检查接口名称是否存在 -->
|
||||
<select id="getAllDeviceSn" parameterType="AllInterfaceName" resultType="AllInterfaceName">
|
||||
SELECT
|
||||
device_sn AS deviceSn
|
||||
@@ -207,18 +206,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
group by device_sn
|
||||
</select>
|
||||
<!-- 检查交换机接口名称是否存在 -->
|
||||
<select id="getAllSwitchSn" parameterType="AllInterfaceName" resultType="AllInterfaceName">
|
||||
SELECT
|
||||
switch_sn AS switchSn, switch_ip switchIp
|
||||
client_id AS clientId, switch_ip switchIp
|
||||
FROM
|
||||
all_interface_name
|
||||
<where>
|
||||
and resource_type = '2' and switch_sn != ''
|
||||
and resource_type = '2' and client_id != ''
|
||||
</where>
|
||||
group by switch_sn
|
||||
group by client_id
|
||||
</select>
|
||||
<!-- MyBatis Mapper XML配置 -->
|
||||
<update id="batchUpdate" parameterType="java.util.List">
|
||||
<foreach collection="list" item="item" index="index" open="" separator=";" close="">
|
||||
UPDATE all_interface_name
|
||||
|
||||
+20
-1
@@ -35,16 +35,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="businessId" column="business_id" />
|
||||
<result property="remark1" column="remark1" />
|
||||
<result property="createDatetime" column="create_datetime" />
|
||||
<result property="clientId" column="client_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEpsNodeBandwidthVo">
|
||||
select id, node_name, hardware_sn, calculation_mode, bandwidth_type, bandwidth_result, bandwidth_95_daily, bandwidth_95_monthly, avg_monthly_bandwidth_95, package_bandwidth_daily, machine_flow, customer_id, customer_name, service_number, uplink_switch, create_time, update_time, creator_id, creator_name, switch_sn, interface_name, resource_type, interface_link_device_type, effective_bandwidth_95_daily, effective_bandwidth_95_monthly, effective_avg_monthly_bandwidth_95, business_name, business_id, remark1, create_datetime from eps_node_bandwidth
|
||||
select id, node_name, hardware_sn, calculation_mode, bandwidth_type, bandwidth_result, bandwidth_95_daily,
|
||||
bandwidth_95_monthly, avg_monthly_bandwidth_95, package_bandwidth_daily, machine_flow, customer_id,
|
||||
customer_name, service_number, uplink_switch, create_time, update_time, creator_id, creator_name,
|
||||
switch_sn, interface_name, resource_type, interface_link_device_type, effective_bandwidth_95_daily,
|
||||
effective_bandwidth_95_monthly, effective_avg_monthly_bandwidth_95, business_name, business_id,
|
||||
remark1, create_datetime, client_id from eps_node_bandwidth
|
||||
</sql>
|
||||
|
||||
<select id="selectEpsNodeBandwidthList" parameterType="EpsNodeBandwidth" resultMap="EpsNodeBandwidthResult">
|
||||
<include refid="selectEpsNodeBandwidthVo"/>
|
||||
<where>
|
||||
<if test="nodeName != null and nodeName != ''"> and node_name like concat('%', #{nodeName}, '%')</if>
|
||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
||||
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
|
||||
<if test="calculationMode != null and calculationMode != ''"> and calculation_mode = #{calculationMode}</if>
|
||||
<if test="bandwidthType != null and bandwidthType != ''"> and bandwidth_type = #{bandwidthType}</if>
|
||||
@@ -123,6 +130,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="businessName != null">business_name,</if>
|
||||
<if test="businessId != null">business_id,</if>
|
||||
<if test="remark1 != null">remark1,</if>
|
||||
<if test="clientId != null">client_id,</if>
|
||||
create_datetime,
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
@@ -153,6 +161,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="businessName != null">#{businessName},</if>
|
||||
<if test="businessId != null">#{businessId},</if>
|
||||
<if test="remark1 != null">#{remark1},</if>
|
||||
<if test="clientId != null">#{clientId},</if>
|
||||
NOW(),
|
||||
</trim>
|
||||
</insert>
|
||||
@@ -188,6 +197,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="businessId != null">business_id = #{businessId},</if>
|
||||
<if test="remark1 != null">remark1 = #{remark1},</if>
|
||||
<if test="createDatetime != null">create_datetime = #{createDatetime},</if>
|
||||
<if test="clientId != null">client_id = #{clientId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@@ -252,6 +262,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="calculationMode != '' and calculationMode != null">
|
||||
and calculation_mode = #{calculationMode}
|
||||
</if>
|
||||
<if test="clientId != '' and clientId != null">
|
||||
and client_id = #{clientId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -273,6 +286,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="businessId != '' and businessId != null">
|
||||
and business_id = #{businessId}
|
||||
</if>
|
||||
<if test="clientId != '' and clientId != null">
|
||||
and client_id = #{clientId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -291,6 +307,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="businessId != '' and businessId != null">
|
||||
and business_id = #{businessId}
|
||||
</if>
|
||||
<if test="clientId != '' and clientId != null">
|
||||
and client_id = #{clientId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
+8
-1
@@ -14,6 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="type" column="type" />
|
||||
<result property="inSpeed" column="in_speed" />
|
||||
<result property="outSpeed" column="out_speed" />
|
||||
<result property="maxSpeed" column="max_speed" />
|
||||
<result property="switchIp" column="switch_ip" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
@@ -36,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectInitialSwitchInfoDetailsVo">
|
||||
select id, client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed, switch_ip, create_by, update_by, create_time, update_time, switch_name, interface_device_type, server_name, server_port, server_sn, switch_sn, business_code, business_name, if_speed, if_in_discards, if_out_discards, if_in_errors, if_out_errors, if_index from initial_switch_info_details
|
||||
select id, client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed, max_speed, switch_ip, create_by, update_by, create_time, update_time, switch_name, interface_device_type, server_name, server_port, server_sn, switch_sn, business_code, business_name, if_speed, if_in_discards, if_out_discards, if_in_errors, if_out_errors, if_index from initial_switch_info_details
|
||||
</sql>
|
||||
|
||||
<select id="selectInitialSwitchInfoDetailsList" parameterType="InitialSwitchInfoDetails" resultMap="InitialSwitchInfoDetailsResult">
|
||||
@@ -85,6 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="type != null">type,</if>
|
||||
<if test="inSpeed != null">in_speed,</if>
|
||||
<if test="outSpeed != null">out_speed,</if>
|
||||
<if test="maxSpeed != null">max_speed,</if>
|
||||
<if test="switchIp != null">switch_ip,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
@@ -114,6 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="inSpeed != null">#{inSpeed},</if>
|
||||
<if test="outSpeed != null">#{outSpeed},</if>
|
||||
<if test="maxSpeed != null">#{maxSpeed},</if>
|
||||
<if test="switchIp != null">#{switchIp},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
@@ -147,6 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="inSpeed != null">in_speed = #{inSpeed},</if>
|
||||
<if test="outSpeed != null">out_speed = #{outSpeed},</if>
|
||||
<if test="maxSpeed != null">max_speed = #{maxSpeed},</if>
|
||||
<if test="switchIp != null">switch_ip = #{switchIp},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
@@ -192,6 +196,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
`type`,
|
||||
in_speed AS inSpeed,
|
||||
out_speed AS outSpeed,
|
||||
max_speed AS maxSpeed,
|
||||
switch_ip AS switchIp,
|
||||
if_index AS ifIndex,
|
||||
if_speed AS ifSpeed,
|
||||
@@ -224,6 +229,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
`type`,
|
||||
in_speed,
|
||||
out_speed,
|
||||
max_speed,
|
||||
switch_ip,
|
||||
if_index,
|
||||
if_speed,
|
||||
@@ -255,6 +261,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{item.type},
|
||||
#{item.inSpeed},
|
||||
#{item.outSpeed},
|
||||
#{item.maxSpeed},
|
||||
#{item.switchIp},
|
||||
#{item.ifIndex},
|
||||
#{item.ifSpeed},
|
||||
|
||||
Reference in New Issue
Block a user