源数据接口修改,解决接口名称表数据重复bug,增加资源名称同步修改逻辑。

This commit is contained in:
gaoyutao
2025-09-04 23:18:08 +08:00
parent ec3fb074e1
commit 8aaa60d7ef
29 changed files with 396 additions and 571 deletions
@@ -148,12 +148,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
server_ip AS serverIp
FROM
all_interface_name
WHERE
client_id = #{clientId} and
interface_name IN
<foreach collection="interfaceNames" item="name" open="(" separator="," close=")">
#{name}
</foreach>
<where>
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
<if test="interfaceName != null and interfaceName != ''"> and interface_name = #{interfaceName}</if>
<if test="deviceSn != null and deviceSn != ''"> and device_sn = #{deviceSn}</if>
<if test="nodeName != null and nodeName != ''"> and node_name = #{nodeName}</if>
<if test="businessCode != null and businessCode != ''"> and business_code = #{businessCode}</if>
<if test="resourceType != null and resourceType != ''"> and resource_type = #{resourceType}</if>
<if test="switchName != null and switchName != ''"> and switch_name = #{switchName}</if>
<if test="interfaceDeviceType != null and interfaceDeviceType != ''"> and interface_device_type = #{interfaceDeviceType}</if>
<if test="serverPort != null and serverPort != ''"> and server_port = #{serverPort}</if>
<if test="switchSn != null and switchSn != ''"> and switch_sn = #{switchSn}</if>
<if test="switchIp != null and switchIp != ''"> and switch_ip = #{switchIp}</if>
<if test="serverIp != null and serverIp != ''"> and server_ip = #{serverIp}</if>
</where>
</select>
<!-- 批量插入接口名称 -->
@@ -32,10 +32,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="businessName" column="business_name" />
<result property="businessId" column="business_id" />
<result property="remark1" column="remark1" />
<result property="createDatetime" column="create_datetime" />
</resultMap>
<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
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, create_datetime from eps_node_bandwidth
</sql>
<select id="selectEpsNodeBandwidthList" parameterType="EpsNodeBandwidth" resultMap="EpsNodeBandwidthResult">
@@ -80,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</if>
</where>
<if test="createDatetime != null "> and create_datetime = #{createDatetime}</if>
</select>
<select id="selectEpsNodeBandwidthById" parameterType="Long" resultMap="EpsNodeBandwidthResult">
@@ -116,6 +118,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>
create_datetime,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="nodeName != null">#{nodeName},</if>
@@ -144,6 +147,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>
NOW(),
</trim>
</insert>
@@ -176,9 +180,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="businessName != null">business_name = #{businessName},</if>
<if test="businessId != null">business_id = #{businessId},</if>
<if test="remark1 != null">remark1 = #{remark1},</if>
<if test="createDatetime != null">create_datetime = #{createDatetime},</if>
</trim>
where id = #{id}
</update>
<update id="updateEpsNodeBandwidthByServerSn" parameterType="EpsNodeBandwidth">
update eps_node_bandwidth
<trim prefix="SET" suffixOverrides=",">
<if test="nodeName != null">node_name = #{nodeName},</if>
</trim>
where hardware_sn = #{hardwareSn}
</update>
<delete id="deleteEpsNodeBandwidthById" parameterType="Long">
delete from eps_node_bandwidth where id = #{id}
@@ -110,6 +110,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
where id = #{id}
</update>
<update id="updateEpsServerRevenueConfigByServerSn" parameterType="EpsServerRevenueConfig">
update eps_server_revenue_config
<trim prefix="SET" suffixOverrides=",">
<if test="nodeName != null">node_name = #{nodeName},</if>
</trim>
where hardware_sn = #{hardwareSn}
</update>
<delete id="deleteEpsServerRevenueConfigById" parameterType="Long">
delete from eps_server_revenue_config where id = #{id}
@@ -105,6 +105,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
where id = #{id}
</update>
<update id="updateRmEpsTopologyManagementByServerSn" parameterType="RmEpsTopologyManagement">
update rm_eps_topology_management
<trim prefix="SET" suffixOverrides=",">
<if test="serverName != null">`server_name` = #{serverName},</if>
</trim>
where server_sn = #{serverSn}
</update>
<delete id="deleteRmEpsTopologyManagementById" parameterType="Long">
delete from rm_eps_topology_management where id = #{id}