一、MySQL
1、新增
<insert id="InsertList" parameterType="Entity">
insert into Table (
id,
name
)
values
<foreach collection ="list" item="item" separator="," >
(
#{item.id, jdbcType=BIGINT},
#{item.name, jdbcType=VARCHAR}
)
</foreach>
</insert>
2、更新
<update id="updateBatch" parameterType="java.util.List" >
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
update Table
<set >
<if test="item.name != null" >
name = #{item.name,jdbcType=VARCHAR},
</if>
<if test="item