修复时间戳与数据表入库时间差1秒问题,开发重新计算接口,交换机详情增加业务代码,业务名称,修复各个表业务信息不匹配问题

This commit is contained in:
gaoyutao
2025-08-29 19:17:43 +08:00
parent ea6e65bfaf
commit 506fd1dcc1
13 changed files with 341 additions and 129 deletions
@@ -189,13 +189,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
group by switch_sn
</select>
<update id="batchUpdate">
<foreach collection="list" item="item" separator=";">
<!-- MyBatis Mapper XML配置 -->
<update id="batchUpdate" parameterType="java.util.List">
<foreach collection="list" item="item" index="index" open="" separator=";" close="">
UPDATE all_interface_name
SET
business_code = #{item.businessCode},
business_name = #{item.businessName},
update_time = now(),
update_time = NOW(),
client_id = #{item.clientId},
device_sn = #{item.deviceSn},
node_name = #{item.nodeName},
@@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
node_name varchar(200) COMMENT '服务器名称',
revenue_method varchar(10) COMMENT '收益方式(1.流量,2包端)',
package_bandwidth DECIMAL(10,2) COMMENT '包端带宽值',
create_time DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
create_time DATETIME COMMENT '创建时间',
update_time DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
create_by VARCHAR(50) COMMENT '创建人',
update_by VARCHAR(50) COMMENT '修改人',
@@ -45,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
`out_dropped` DECIMAL(5,2) COMMENT '出站丢包率(%)',
`in_speed` VARCHAR(20) COMMENT '接收带宽(Mbps)',
`out_speed` VARCHAR(20) COMMENT '发送带宽(Mbps)',
create_time DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
create_time DATETIME COMMENT '创建时间',
update_time DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
create_by VARCHAR(50) COMMENT '创建人',
update_by VARCHAR(50) COMMENT '修改人',
@@ -3,133 +3,175 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.InitialSwitchInfoDetailsMapper">
<resultMap type="InitialSwitchInfoDetails" id="InitialSwitchInfoDetailsResult">
<resultMap type="EpsNodeBandwidth" id="EpsNodeBandwidthResult">
<result property="id" column="id" />
<result property="clientId" column="client_id" />
<result property="name" column="name" />
<result property="inBytes" column="in_bytes" />
<result property="outBytes" column="out_bytes" />
<result property="status" column="status" />
<result property="type" column="type" />
<result property="inSpeed" column="in_speed" />
<result property="outSpeed" column="out_speed" />
<result property="createBy" column="create_by" />
<result property="updateBy" column="update_by" />
<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" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="switchName" column="switch_name" />
<result property="interfaceDeviceType" column="interface_device_type" />
<result property="serverName" column="server_name" />
<result property="serverPort" column="server_port" />
<result property="serverSn" column="server_sn" />
<result property="creatorId" column="creator_id" />
<result property="creatorName" column="creator_name" />
<result property="switchSn" column="switch_sn" />
<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" />
</resultMap>
<sql id="selectInitialSwitchInfoDetailsVo">
select id, client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed, create_by, update_by, create_time, update_time, switch_name, interface_device_type, server_name, server_port, server_sn, switch_sn from initial_switch_info_details
<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
</sql>
<select id="selectInitialSwitchInfoDetailsList" parameterType="InitialSwitchInfoDetails" resultMap="InitialSwitchInfoDetailsResult">
<include refid="selectInitialSwitchInfoDetailsVo"/>
<where>
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="inBytes != null "> and in_bytes = #{inBytes}</if>
<if test="outBytes != null "> and out_bytes = #{outBytes}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="inSpeed != null "> and in_speed = #{inSpeed}</if>
<if test="outSpeed != null "> and out_speed = #{outSpeed}</if>
<if test="switchName != null and switchName != ''"> and switch_name like concat('%', #{switchName}, '%')</if>
<if test="interfaceDeviceType != null and interfaceDeviceType != ''"> and interface_device_type = #{interfaceDeviceType}</if>
<if test="serverName != null and serverName != ''"> and server_name like concat('%', #{serverName}, '%')</if>
<if test="serverPort != null and serverPort != ''"> and server_port = #{serverPort}</if>
<if test="serverSn != null and serverSn != ''"> and server_sn = #{serverSn}</if>
<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>
<if test="switchSn != null and switchSn != ''"> and switch_sn = #{switchSn}</if>
<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>
</where>
</select>
<select id="selectInitialSwitchInfoDetailsById" parameterType="Long" resultMap="InitialSwitchInfoDetailsResult">
<include refid="selectInitialSwitchInfoDetailsVo"/>
<select id="selectEpsNodeBandwidthById" parameterType="Long" resultMap="EpsNodeBandwidthResult">
<include refid="selectEpsNodeBandwidthVo"/>
where id = #{id}
</select>
<insert id="insertInitialSwitchInfoDetails" parameterType="InitialSwitchInfoDetails" useGeneratedKeys="true" keyProperty="id">
insert into initial_switch_info_details
<insert id="insertEpsNodeBandwidth" parameterType="EpsNodeBandwidth" useGeneratedKeys="true" keyProperty="id">
insert into eps_node_bandwidth
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="clientId != null and clientId != ''">client_id,</if>
<if test="name != null and name != ''">name,</if>
<if test="inBytes != null">in_bytes,</if>
<if test="outBytes != null">out_bytes,</if>
<if test="status != null">status,</if>
<if test="type != null">type,</if>
<if test="inSpeed != null">in_speed,</if>
<if test="outSpeed != null">out_speed,</if>
<if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if>
<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>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="switchName != null">switch_name,</if>
<if test="interfaceDeviceType != null">interface_device_type,</if>
<if test="serverName != null">server_name,</if>
<if test="serverPort != null">server_port,</if>
<if test="serverSn != null">server_sn,</if>
<if test="creatorId != null">creator_id,</if>
<if test="creatorName != null">creator_name,</if>
<if test="switchSn != null">switch_sn,</if>
</trim>
<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>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="clientId != null and clientId != ''">#{clientId},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="inBytes != null">#{inBytes},</if>
<if test="outBytes != null">#{outBytes},</if>
<if test="status != null">#{status},</if>
<if test="type != null">#{type},</if>
<if test="inSpeed != null">#{inSpeed},</if>
<if test="outSpeed != null">#{outSpeed},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if>
<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>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="switchName != null">#{switchName},</if>
<if test="interfaceDeviceType != null">#{interfaceDeviceType},</if>
<if test="serverName != null">#{serverName},</if>
<if test="serverPort != null">#{serverPort},</if>
<if test="serverSn != null">#{serverSn},</if>
<if test="creatorId != null">#{creatorId},</if>
<if test="creatorName != null">#{creatorName},</if>
<if test="switchSn != null">#{switchSn},</if>
</trim>
<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>
</insert>
<update id="updateInitialSwitchInfoDetails" parameterType="InitialSwitchInfoDetails">
update initial_switch_info_details
<update id="updateEpsNodeBandwidth" parameterType="EpsNodeBandwidth">
update eps_node_bandwidth
<trim prefix="SET" suffixOverrides=",">
<if test="clientId != null and clientId != ''">client_id = #{clientId},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="inBytes != null">in_bytes = #{inBytes},</if>
<if test="outBytes != null">out_bytes = #{outBytes},</if>
<if test="status != null">status = #{status},</if>
<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="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<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>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="switchName != null">switch_name = #{switchName},</if>
<if test="interfaceDeviceType != null">interface_device_type = #{interfaceDeviceType},</if>
<if test="serverName != null">server_name = #{serverName},</if>
<if test="serverPort != null">server_port = #{serverPort},</if>
<if test="serverSn != null">server_sn = #{serverSn},</if>
<if test="creatorId != null">creator_id = #{creatorId},</if>
<if test="creatorName != null">creator_name = #{creatorName},</if>
<if test="switchSn != null">switch_sn = #{switchSn},</if>
<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>
</trim>
where id = #{id}
</update>
<delete id="deleteInitialSwitchInfoDetailsById" parameterType="Long">
delete from initial_switch_info_details where id = #{id}
<delete id="deleteEpsNodeBandwidthById" parameterType="Long">
delete from eps_node_bandwidth where id = #{id}
</delete>
<delete id="deleteInitialSwitchInfoDetailsByIds" parameterType="String">
delete from initial_switch_info_details where id in
<delete id="deleteEpsNodeBandwidthByIds" parameterType="String">
delete from eps_node_bandwidth where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
@@ -176,6 +218,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
server_port,
server_sn,
switch_sn,
business_code,
business_name,
create_by,
update_by,
create_time,
@@ -198,6 +242,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item.serverPort},
#{item.serverSn},
#{item.switchSn},
#{item.businessCode},
#{item.businessName},
#{item.createBy},
#{item.updateBy},
<choose>