mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-12 11:02:37 +08:00
连接信息写DB优化为批量写入
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
<insert id="replace" parameterType="com.xiaojukeji.kafka.manager.common.entity.pojo.gateway.TopicConnectionDO">
|
||||
<insert id="batchReplace" parameterType="java.util.List">
|
||||
REPLACE INTO topic_connections (
|
||||
cluster_id,
|
||||
topic_name,
|
||||
@@ -22,16 +22,19 @@
|
||||
ip,
|
||||
client_version,
|
||||
create_time
|
||||
)
|
||||
VALUES (
|
||||
#{clusterId},
|
||||
#{topicName},
|
||||
#{type},
|
||||
#{appId},
|
||||
#{ip},
|
||||
#{clientVersion},
|
||||
#{createTime}
|
||||
)
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="list" item="item" index="index" separator=",">
|
||||
(
|
||||
#{item.clusterId},
|
||||
#{item.topicName},
|
||||
#{item.type},
|
||||
#{item.appId},
|
||||
#{item.ip},
|
||||
#{item.clientVersion},
|
||||
#{item.createTime}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="getByTopicName" parameterType="java.util.Map" resultMap="TopicConnectionMap">
|
||||
|
||||
Reference in New Issue
Block a user