对应的DAO层
int insertOrderBatch(List<Order> list);
批量插入mapper:
<insert id="insertOrderBatch" parameterType="java.util.List"> insert into table_order (id, ref_no,finance) values <foreach collection="list" item="item" separator=","> (#{item.id,jdbcType=VARCHAR}, #{item.refNo,jdbcType=VARCHAR},#{item.finance,jdbcType=VARCHAR}) </foreach> </insert>