解决多线程导致某些数据表数据重复问题。

This commit is contained in:
gaoyutao
2025-09-05 14:38:46 +08:00
parent 8aaa60d7ef
commit 3a45714100
16 changed files with 122 additions and 91 deletions
@@ -112,7 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</insert>
<insert id="batchInsert" parameterType="InitialBandwidthTraffic">
INSERT INTO ${tableName} (
INSERT IGNORE INTO ${tableName} (
`name`, `mac`, `status`, `type`, ipV4, `in_dropped`, `out_dropped`,
`in_speed`, `out_speed`,create_by, update_by, client_id, create_time
) VALUES
@@ -111,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<insert id="batchInsertInitialSwitchInfo" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
INSERT INTO initial_switch_info
INSERT IGNORE INTO initial_switch_info
(
client_id, `name`, in_bytes, out_bytes, status, `type`, in_speed, out_speed, switch_ip,
create_by, update_by, create_time, update_time
@@ -110,7 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<insert id="batchInsertInitialSwitchInfoTemp" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
INSERT INTO initial_switch_info_temp
INSERT IGNORE INTO initial_switch_info_temp
(
client_id, name, in_bytes, out_bytes, status, type, in_speed, out_speed, switch_ip,
create_by, update_by, create_time, update_time