<insert id="batchInsert" parameterType="java.util.List">
insert into T_DT_DICT (ID, PROJECT_ID, NAME,
PARENT_ID, LEVEL, PATH,
CREATE_DATE, MODIFIER_ID, MODIFIER,
MODIFY_DATE, SEQUENCE, CODE
)
values
<foreach collection="list" item="item" index="index" separator="," >
(#{item.id},#{item.projectId},#{item.name},#{item.parentId},#{item.level},#{item.path},#{item.createDate},
#{item.modifierId},#{item.modifier},#{item.modifyDate},#{item.sequence},#{item.code}
)
</foreach>
</insert>
转载于:https://my.oschina.net/ydsakyclguozi/blog/146330