mapper
void saveRecordsBatch(@Param("list") List<msgsenddetailrecord> list);
xml:注意,连接符是UNION ALL
<insert id="saveRecordsBatch">
insert into msg_send_detail_record
select SEQ_MSG_SEND_DETAIL_RECORD.nextval,A.* from (
<foreach collection="list" item="item" index="index" separator="UNION ALL">
select
#{item.batchId},
#{item.userId},
#{item.phone},
#{item.status},
#{item.sendDelayTime},
#{item.remarks},
#{item.del},
#{item.ct},
#{item.cu},
#{item.lmt},
#{item.lmu}
from dual
</foreach>
) A
</insert>