<insert id="insertMessageIntoMid" parameterType="java.util.ArrayList">
insert into ARCHIVES_TPM_MID_MESSAGE (id, message, created,status)
(
<foreach collection="itemList" separator="union" item="item" index="">
select
#{item.id, jdbcType=VARCHAR},#{item.message, jdbcType=VARCHAR},#{item.created, jdbcType=VARCHAR},#{item.status, jdbcType=VARCHAR}
from dual
</foreach>
)
</insert>
id为DAO中的方法名称,parameterType为方法参数类型。