总是会突然忘记,怎么批量插入,批量更新,这些sql

<update id="addPoolCpn" parameterType="java.util.List">
<foreach collection="list" item="item" index="index" open=""
close="" separator=";">
UPDATE xxx.cpn_pool
<set>
cpnKey = #{item.cpnKey},
pincodeProductKey =
#{item.pincodeProductKey},
pincodeCpnKey = #{item.pincodeCpnKey},
`updatedAt` = now(),
version = version+1
</set>
WHERE `key` = #{item.key}
</foreach>
</update>
posted @ 2021-07-23 15:22  夏之  阅读(36)  评论(0编辑  收藏  举报