优化交换机数据入库

This commit is contained in:
gaoyutao
2025-09-28 19:33:39 +08:00
parent 9fa62124e6
commit b8548b1077
21 changed files with 331 additions and 115 deletions
@@ -84,4 +84,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<insert id="insertBatchInitialSwitchFanInfo" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
insert IGNORE into initial_switch_fan_info
(
fan_ent_index,
fan_name,
fan_entity_fan_state,
client_id,
create_time,
update_time,
create_by,
update_by
)
values
<foreach collection="list" item="item" separator=",">
(
#{item.fanEntIndex},
#{item.fanName},
#{item.fanEntityFanState},
#{item.clientId},
#{item.createTime},
#{item.updateTime},
#{item.createBy},
#{item.updateBy}
)
</foreach>
</insert>
</mapper>
@@ -99,4 +99,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<insert id="insertBatchInitialSwitchMpuInfo" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
insert IGNORE into initial_switch_mpu_info
(
mpu_ent_index,
mpu_name,
mpu_entity_cpu_usage,
mpu_entity_mem_usage,
mpu_physical_software_rev,
mpu_entity_temperature,
client_id,
create_time,
update_time,
create_by,
update_by
)
values
<foreach collection="list" item="item" separator=",">
(
#{item.mpuEntIndex},
#{item.mpuName},
#{item.mpuEntityCpuUsage},
#{item.mpuEntityMemUsage},
#{item.mpuPhysicalSoftwareRev},
#{item.mpuEntityTemperature},
#{item.clientId},
#{item.createTime},
#{item.updateTime},
#{item.createBy},
#{item.updateBy}
)
</foreach>
</insert>
</mapper>
@@ -99,4 +99,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<insert id="batchInitialSwitchOpticalModule" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
insert IGNORE into initial_switch_optical_module
(
fiber_ent_index,
fiber_port_name,
hw_entity_optical_tx_low_threshold,
hw_entity_optical_rx_low_threshold,
hw_entity_optical_rx_power,
hw_entity_optical_tx_power,
client_id,
create_time,
update_time,
create_by,
update_by
)
values
<foreach collection="list" item="item" separator=",">
(
#{item.fiberEntIndex},
#{item.fiberPortName},
#{item.hwEntityOpticalTxLowThreshold},
#{item.hwEntityOpticalRxLowThreshold},
#{item.hwEntityOpticalRxPower},
#{item.hwEntityOpticalTxPower},
#{item.clientId},
#{item.createTime},
#{item.updateTime},
#{item.createBy},
#{item.updateBy}
)
</foreach>
</insert>
</mapper>
@@ -94,4 +94,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<insert id="insertBatchInitialSwitchPowerSupply" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
insert IGNORE into initial_switch_power_supply
(
pwr_ent_index,
pwr_name,
pwr_entity_pwr_state,
pwr_entity_pwr_current,
pwr_entity_pwr_voltage,
client_id,
create_time,
update_time,
create_by,
update_by
)
values
<foreach collection="list" item="item" separator=",">
(
#{item.pwrEntIndex},
#{item.pwrName},
#{item.pwrEntityPwrState},
#{item.pwrEntityPwrCurrent},
#{item.pwrEntityPwrVoltage},
#{item.clientId},
#{item.createTime},
#{item.updateTime},
#{item.createBy},
#{item.updateBy}
)
</foreach>
</insert>
</mapper>