2025-08-26 19:14:12 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.ruoyi.system.mapper.InitialSwitchInfoDetailsMapper">
|
2025-08-29 19:17:43 +08:00
|
|
|
|
|
|
|
|
<resultMap type="EpsNodeBandwidth" id="EpsNodeBandwidthResult">
|
2025-08-26 19:14:12 +08:00
|
|
|
<result property="id" column="id" />
|
2025-08-29 19:17:43 +08:00
|
|
|
<result property="nodeName" column="node_name" />
|
|
|
|
|
<result property="hardwareSn" column="hardware_sn" />
|
|
|
|
|
<result property="bandwidthType" column="bandwidth_type" />
|
|
|
|
|
<result property="bandwidthResult" column="bandwidth_result" />
|
|
|
|
|
<result property="bandwidth95Daily" column="bandwidth_95_daily" />
|
|
|
|
|
<result property="bandwidth95Monthly" column="bandwidth_95_monthly" />
|
|
|
|
|
<result property="avgMonthlyBandwidth95" column="avg_monthly_bandwidth_95" />
|
|
|
|
|
<result property="packageBandwidthDaily" column="package_bandwidth_daily" />
|
|
|
|
|
<result property="customerId" column="customer_id" />
|
|
|
|
|
<result property="customerName" column="customer_name" />
|
|
|
|
|
<result property="serviceNumber" column="service_number" />
|
|
|
|
|
<result property="uplinkSwitch" column="uplink_switch" />
|
2025-08-26 19:14:12 +08:00
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
|
<result property="updateTime" column="update_time" />
|
2025-08-29 19:17:43 +08:00
|
|
|
<result property="creatorId" column="creator_id" />
|
|
|
|
|
<result property="creatorName" column="creator_name" />
|
2025-08-26 19:14:12 +08:00
|
|
|
<result property="switchSn" column="switch_sn" />
|
2025-08-29 19:17:43 +08:00
|
|
|
<result property="interfaceName" column="interface_name" />
|
|
|
|
|
<result property="resourceType" column="resource_type" />
|
|
|
|
|
<result property="interfaceLinkDeviceType" column="interface_link_device_type" />
|
|
|
|
|
<result property="effectiveBandwidth95Daily" column="effective_bandwidth_95_daily" />
|
|
|
|
|
<result property="effectiveBandwidth95Monthly" column="effective_bandwidth_95_monthly" />
|
|
|
|
|
<result property="effectiveAvgMonthlyBandwidth95" column="effective_avg_monthly_bandwidth_95" />
|
|
|
|
|
<result property="businessName" column="business_name" />
|
|
|
|
|
<result property="businessId" column="business_id" />
|
|
|
|
|
<result property="remark1" column="remark1" />
|
2025-08-26 19:14:12 +08:00
|
|
|
</resultMap>
|
|
|
|
|
|
2025-08-29 19:17:43 +08:00
|
|
|
<sql id="selectEpsNodeBandwidthVo">
|
|
|
|
|
select id, node_name, hardware_sn, bandwidth_type, bandwidth_result, bandwidth_95_daily, bandwidth_95_monthly, avg_monthly_bandwidth_95, package_bandwidth_daily, 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 from eps_node_bandwidth
|
2025-08-26 19:14:12 +08:00
|
|
|
</sql>
|
|
|
|
|
|
2025-08-29 19:17:43 +08:00
|
|
|
<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="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
|
|
|
|
|
<if test="bandwidthType != null and bandwidthType != ''"> and bandwidth_type = #{bandwidthType}</if>
|
|
|
|
|
<if test="bandwidthResult != null "> and bandwidth_result = #{bandwidthResult}</if>
|
|
|
|
|
<if test="bandwidth95Daily != null "> and bandwidth_95_daily = #{bandwidth95Daily}</if>
|
|
|
|
|
<if test="bandwidth95Monthly != null "> and bandwidth_95_monthly = #{bandwidth95Monthly}</if>
|
|
|
|
|
<if test="avgMonthlyBandwidth95 != null "> and avg_monthly_bandwidth_95 = #{avgMonthlyBandwidth95}</if>
|
|
|
|
|
<if test="packageBandwidthDaily != null "> and package_bandwidth_daily = #{packageBandwidthDaily}</if>
|
|
|
|
|
<if test="customerId != null and customerId != ''"> and customer_id = #{customerId}</if>
|
|
|
|
|
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
|
|
|
|
<if test="serviceNumber != null and serviceNumber != ''"> and service_number = #{serviceNumber}</if>
|
|
|
|
|
<if test="uplinkSwitch != null and uplinkSwitch != ''"> and uplink_switch like concat('%', #{uplinkSwitch}, '%')</if>
|
|
|
|
|
<if test="creatorId != null "> and creator_id = #{creatorId}</if>
|
|
|
|
|
<if test="creatorName != null and creatorName != ''"> and creator_name like concat('%', #{creatorName}, '%')</if>
|
2025-08-26 19:14:12 +08:00
|
|
|
<if test="switchSn != null and switchSn != ''"> and switch_sn = #{switchSn}</if>
|
2025-08-29 19:17:43 +08:00
|
|
|
<if test="interfaceName != null and interfaceName != ''"> and interface_name like concat('%', #{interfaceName}, '%')</if>
|
|
|
|
|
<if test="resourceType != null and resourceType != ''"> and resource_type = #{resourceType}</if>
|
|
|
|
|
<if test="interfaceLinkDeviceType != null and interfaceLinkDeviceType != ''"> and interface_link_device_type = #{interfaceLinkDeviceType}</if>
|
|
|
|
|
<if test="effectiveBandwidth95Daily != null "> and effective_bandwidth_95_daily = #{effectiveBandwidth95Daily}</if>
|
|
|
|
|
<if test="effectiveBandwidth95Monthly != null "> and effective_bandwidth_95_monthly = #{effectiveBandwidth95Monthly}</if>
|
|
|
|
|
<if test="effectiveAvgMonthlyBandwidth95 != null "> and effective_avg_monthly_bandwidth_95 = #{effectiveAvgMonthlyBandwidth95}</if>
|
|
|
|
|
<if test="businessName != null and businessName != ''"> and business_name like concat('%', #{businessName}, '%')</if>
|
|
|
|
|
<if test="businessId != null and businessId != ''"> and business_id = #{businessId}</if>
|
|
|
|
|
<if test="remark1 != null and remark1 != ''"> and remark1 = #{remark1}</if>
|
2025-08-26 19:14:12 +08:00
|
|
|
</where>
|
|
|
|
|
</select>
|
2025-08-29 19:17:43 +08:00
|
|
|
|
|
|
|
|
<select id="selectEpsNodeBandwidthById" parameterType="Long" resultMap="EpsNodeBandwidthResult">
|
|
|
|
|
<include refid="selectEpsNodeBandwidthVo"/>
|
2025-08-26 19:14:12 +08:00
|
|
|
where id = #{id}
|
|
|
|
|
</select>
|
|
|
|
|
|
2025-08-29 19:17:43 +08:00
|
|
|
<insert id="insertEpsNodeBandwidth" parameterType="EpsNodeBandwidth" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|
insert into eps_node_bandwidth
|
2025-08-26 19:14:12 +08:00
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
2025-08-29 19:17:43 +08:00
|
|
|
<if test="nodeName != null">node_name,</if>
|
|
|
|
|
<if test="hardwareSn != null">hardware_sn,</if>
|
|
|
|
|
<if test="bandwidthType != null">bandwidth_type,</if>
|
|
|
|
|
<if test="bandwidthResult != null">bandwidth_result,</if>
|
|
|
|
|
<if test="bandwidth95Daily != null">bandwidth_95_daily,</if>
|
|
|
|
|
<if test="bandwidth95Monthly != null">bandwidth_95_monthly,</if>
|
|
|
|
|
<if test="avgMonthlyBandwidth95 != null">avg_monthly_bandwidth_95,</if>
|
|
|
|
|
<if test="packageBandwidthDaily != null">package_bandwidth_daily,</if>
|
|
|
|
|
<if test="customerId != null">customer_id,</if>
|
|
|
|
|
<if test="customerName != null">customer_name,</if>
|
|
|
|
|
<if test="serviceNumber != null">service_number,</if>
|
|
|
|
|
<if test="uplinkSwitch != null">uplink_switch,</if>
|
2025-08-26 19:14:12 +08:00
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
2025-08-29 19:17:43 +08:00
|
|
|
<if test="creatorId != null">creator_id,</if>
|
|
|
|
|
<if test="creatorName != null">creator_name,</if>
|
2025-08-26 19:14:12 +08:00
|
|
|
<if test="switchSn != null">switch_sn,</if>
|
2025-08-29 19:17:43 +08:00
|
|
|
<if test="interfaceName != null">interface_name,</if>
|
|
|
|
|
<if test="resourceType != null">resource_type,</if>
|
|
|
|
|
<if test="interfaceLinkDeviceType != null">interface_link_device_type,</if>
|
|
|
|
|
<if test="effectiveBandwidth95Daily != null">effective_bandwidth_95_daily,</if>
|
|
|
|
|
<if test="effectiveBandwidth95Monthly != null">effective_bandwidth_95_monthly,</if>
|
|
|
|
|
<if test="effectiveAvgMonthlyBandwidth95 != null">effective_avg_monthly_bandwidth_95,</if>
|
|
|
|
|
<if test="businessName != null">business_name,</if>
|
|
|
|
|
<if test="businessId != null">business_id,</if>
|
|
|
|
|
<if test="remark1 != null">remark1,</if>
|
|
|
|
|
</trim>
|
2025-08-26 19:14:12 +08:00
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
2025-08-29 19:17:43 +08:00
|
|
|
<if test="nodeName != null">#{nodeName},</if>
|
|
|
|
|
<if test="hardwareSn != null">#{hardwareSn},</if>
|
|
|
|
|
<if test="bandwidthType != null">#{bandwidthType},</if>
|
|
|
|
|
<if test="bandwidthResult != null">#{bandwidthResult},</if>
|
|
|
|
|
<if test="bandwidth95Daily != null">#{bandwidth95Daily},</if>
|
|
|
|
|
<if test="bandwidth95Monthly != null">#{bandwidth95Monthly},</if>
|
|
|
|
|
<if test="avgMonthlyBandwidth95 != null">#{avgMonthlyBandwidth95},</if>
|
|
|
|
|
<if test="packageBandwidthDaily != null">#{packageBandwidthDaily},</if>
|
|
|
|
|
<if test="customerId != null">#{customerId},</if>
|
|
|
|
|
<if test="customerName != null">#{customerName},</if>
|
|
|
|
|
<if test="serviceNumber != null">#{serviceNumber},</if>
|
|
|
|
|
<if test="uplinkSwitch != null">#{uplinkSwitch},</if>
|
2025-08-26 19:14:12 +08:00
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
2025-08-29 19:17:43 +08:00
|
|
|
<if test="creatorId != null">#{creatorId},</if>
|
|
|
|
|
<if test="creatorName != null">#{creatorName},</if>
|
2025-08-26 19:14:12 +08:00
|
|
|
<if test="switchSn != null">#{switchSn},</if>
|
2025-08-29 19:17:43 +08:00
|
|
|
<if test="interfaceName != null">#{interfaceName},</if>
|
|
|
|
|
<if test="resourceType != null">#{resourceType},</if>
|
|
|
|
|
<if test="interfaceLinkDeviceType != null">#{interfaceLinkDeviceType},</if>
|
|
|
|
|
<if test="effectiveBandwidth95Daily != null">#{effectiveBandwidth95Daily},</if>
|
|
|
|
|
<if test="effectiveBandwidth95Monthly != null">#{effectiveBandwidth95Monthly},</if>
|
|
|
|
|
<if test="effectiveAvgMonthlyBandwidth95 != null">#{effectiveAvgMonthlyBandwidth95},</if>
|
|
|
|
|
<if test="businessName != null">#{businessName},</if>
|
|
|
|
|
<if test="businessId != null">#{businessId},</if>
|
|
|
|
|
<if test="remark1 != null">#{remark1},</if>
|
|
|
|
|
</trim>
|
2025-08-26 19:14:12 +08:00
|
|
|
</insert>
|
|
|
|
|
|
2025-08-29 19:17:43 +08:00
|
|
|
<update id="updateEpsNodeBandwidth" parameterType="EpsNodeBandwidth">
|
|
|
|
|
update eps_node_bandwidth
|
2025-08-26 19:14:12 +08:00
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
2025-08-29 19:17:43 +08:00
|
|
|
<if test="nodeName != null">node_name = #{nodeName},</if>
|
|
|
|
|
<if test="hardwareSn != null">hardware_sn = #{hardwareSn},</if>
|
|
|
|
|
<if test="bandwidthType != null">bandwidth_type = #{bandwidthType},</if>
|
|
|
|
|
<if test="bandwidthResult != null">bandwidth_result = #{bandwidthResult},</if>
|
|
|
|
|
<if test="bandwidth95Daily != null">bandwidth_95_daily = #{bandwidth95Daily},</if>
|
|
|
|
|
<if test="bandwidth95Monthly != null">bandwidth_95_monthly = #{bandwidth95Monthly},</if>
|
|
|
|
|
<if test="avgMonthlyBandwidth95 != null">avg_monthly_bandwidth_95 = #{avgMonthlyBandwidth95},</if>
|
|
|
|
|
<if test="packageBandwidthDaily != null">package_bandwidth_daily = #{packageBandwidthDaily},</if>
|
|
|
|
|
<if test="customerId != null">customer_id = #{customerId},</if>
|
|
|
|
|
<if test="customerName != null">customer_name = #{customerName},</if>
|
|
|
|
|
<if test="serviceNumber != null">service_number = #{serviceNumber},</if>
|
|
|
|
|
<if test="uplinkSwitch != null">uplink_switch = #{uplinkSwitch},</if>
|
2025-08-26 19:14:12 +08:00
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
2025-08-29 19:17:43 +08:00
|
|
|
<if test="creatorId != null">creator_id = #{creatorId},</if>
|
|
|
|
|
<if test="creatorName != null">creator_name = #{creatorName},</if>
|
2025-08-26 19:14:12 +08:00
|
|
|
<if test="switchSn != null">switch_sn = #{switchSn},</if>
|
2025-08-29 19:17:43 +08:00
|
|
|
<if test="interfaceName != null">interface_name = #{interfaceName},</if>
|
|
|
|
|
<if test="resourceType != null">resource_type = #{resourceType},</if>
|
|
|
|
|
<if test="interfaceLinkDeviceType != null">interface_link_device_type = #{interfaceLinkDeviceType},</if>
|
|
|
|
|
<if test="effectiveBandwidth95Daily != null">effective_bandwidth_95_daily = #{effectiveBandwidth95Daily},</if>
|
|
|
|
|
<if test="effectiveBandwidth95Monthly != null">effective_bandwidth_95_monthly = #{effectiveBandwidth95Monthly},</if>
|
|
|
|
|
<if test="effectiveAvgMonthlyBandwidth95 != null">effective_avg_monthly_bandwidth_95 = #{effectiveAvgMonthlyBandwidth95},</if>
|
|
|
|
|
<if test="businessName != null">business_name = #{businessName},</if>
|
|
|
|
|
<if test="businessId != null">business_id = #{businessId},</if>
|
|
|
|
|
<if test="remark1 != null">remark1 = #{remark1},</if>
|
2025-08-26 19:14:12 +08:00
|
|
|
</trim>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</update>
|
|
|
|
|
|
2025-08-29 19:17:43 +08:00
|
|
|
<delete id="deleteEpsNodeBandwidthById" parameterType="Long">
|
|
|
|
|
delete from eps_node_bandwidth where id = #{id}
|
2025-08-26 19:14:12 +08:00
|
|
|
</delete>
|
|
|
|
|
|
2025-08-29 19:17:43 +08:00
|
|
|
<delete id="deleteEpsNodeBandwidthByIds" parameterType="String">
|
|
|
|
|
delete from eps_node_bandwidth where id in
|
2025-08-26 19:14:12 +08:00
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
|
|
|
|
<!-- 查询交换机信息-->
|
|
|
|
|
<select id="getAllSwitchInfoMsg" parameterType="InitialSwitchInfoDetails" resultType="InitialSwitchInfoDetails">
|
|
|
|
|
SELECT
|
|
|
|
|
id,
|
|
|
|
|
client_id AS clientId,
|
|
|
|
|
`name`,
|
|
|
|
|
in_bytes AS inBytes,
|
|
|
|
|
out_bytes AS outBytes,
|
|
|
|
|
status,
|
|
|
|
|
`type`,
|
|
|
|
|
in_speed AS inSpeed,
|
|
|
|
|
out_speed AS outSpeed,
|
|
|
|
|
create_by AS createBy,
|
|
|
|
|
update_by AS updateBy,
|
|
|
|
|
create_time AS createTime,
|
|
|
|
|
update_time AS updateTime
|
|
|
|
|
FROM
|
|
|
|
|
initial_switch_info
|
|
|
|
|
<where>
|
|
|
|
|
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
|
|
|
|
<if test="startTime != null and startTime != ''"> and create_time >= #{startTime}</if>
|
|
|
|
|
<if test="endTime != null and endTime != ''"> and create_time <= #{endTime}</if>
|
|
|
|
|
</where>
|
|
|
|
|
ORDER BY create_time DESC
|
|
|
|
|
</select>
|
|
|
|
|
<insert id="saveBatchSwitchTraffic" parameterType="InitialSwitchInfoDetails">
|
|
|
|
|
INSERT INTO initial_switch_info_details
|
|
|
|
|
(
|
|
|
|
|
client_id,
|
|
|
|
|
name,
|
|
|
|
|
in_bytes,
|
|
|
|
|
out_bytes,
|
|
|
|
|
status,
|
|
|
|
|
type,
|
|
|
|
|
in_speed,
|
|
|
|
|
out_speed,
|
|
|
|
|
switch_name,
|
|
|
|
|
interface_device_type,
|
|
|
|
|
server_name,
|
|
|
|
|
server_port,
|
|
|
|
|
server_sn,
|
|
|
|
|
switch_sn,
|
2025-08-29 19:17:43 +08:00
|
|
|
business_code,
|
|
|
|
|
business_name,
|
2025-08-26 19:14:12 +08:00
|
|
|
create_by,
|
|
|
|
|
update_by,
|
|
|
|
|
create_time,
|
|
|
|
|
update_time
|
|
|
|
|
)
|
|
|
|
|
VALUES
|
|
|
|
|
<foreach collection="dataList" item="item" separator=",">
|
|
|
|
|
(
|
|
|
|
|
#{item.clientId},
|
|
|
|
|
#{item.name},
|
|
|
|
|
#{item.inBytes},
|
|
|
|
|
#{item.outBytes},
|
|
|
|
|
#{item.status},
|
|
|
|
|
#{item.type},
|
|
|
|
|
#{item.inSpeed},
|
|
|
|
|
#{item.outSpeed},
|
|
|
|
|
#{item.switchName},
|
|
|
|
|
#{item.interfaceDeviceType},
|
|
|
|
|
#{item.serverName},
|
|
|
|
|
#{item.serverPort},
|
|
|
|
|
#{item.serverSn},
|
|
|
|
|
#{item.switchSn},
|
2025-08-29 19:17:43 +08:00
|
|
|
#{item.businessCode},
|
|
|
|
|
#{item.businessName},
|
2025-08-26 19:14:12 +08:00
|
|
|
#{item.createBy},
|
|
|
|
|
#{item.updateBy},
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="item.createTime != null">
|
|
|
|
|
#{item.createTime}
|
|
|
|
|
</when>
|
|
|
|
|
<otherwise>
|
|
|
|
|
NOW()
|
|
|
|
|
</otherwise>
|
|
|
|
|
</choose>,
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="item.updateTime != null">
|
|
|
|
|
#{item.updateTime}
|
|
|
|
|
</when>
|
|
|
|
|
<otherwise>
|
|
|
|
|
NOW()
|
|
|
|
|
</otherwise>
|
|
|
|
|
</choose>
|
|
|
|
|
)
|
|
|
|
|
</foreach>
|
|
|
|
|
</insert>
|
|
|
|
|
</mapper>
|