mybatis配置文件如下:插入的为集合中的数据,当集合中只有一条数据时可以插入进去,但是当一条以上数据时将会报错
<insert id="batchInsert" parameterType="java.util.List">
<selectKey keyProperty="waybillNo" order="BEFORE" resultType="int">
select current_timestamp ()
</selectKey>
insert into oal_tb_waybill_history (
waybill_no,waybill_type,account,
cabinet_code,box_code,recover_box_code,
captcha,phone,msg_id,msg_state,charge_mode,
money,number,state,receive_time,send_time,
operator_id,create_time,update_time,del_tag
) values
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">
#{item.waybillNo,jdbcType=VARCHAR},
#{item.waybillType,jdbcType=INTEGER},
#{item.account,jdbcType=VARCHAR},
#{item.cabinetCode,jdbcType=VARCHAR},
#{item.boxCode,jdbcType=VARCHAR},
#{item.recoverBoxCode,jdbcType=VARCHAR},
#{item.captcha,jdbcType=VARCHAR},
#{item.phone,jdbcType=VARCHAR},
#{item.msgId,jdbcType=BIGINT},
#{item.msgState,jdbcType=INTEGER},
#{item.chargeMode,jdbcType=INTEGER},
#{item.money,jdbcType=DECIMAL},
#{item.number,jdbcType=TINYINT},
#{item.state,jdbcType=INTEGER},
#{item.receiveTime,jdbcType=TIMESTAMP},
#{item.sendTime,jdbcType=TIMESTAMP},
#{item.operatorId,jdbcType=INTEGER},
#{item.createTime,jdbcType=TIMESTAMP},
#{item.updateTime,jdbcType=TIMESTAMP},
#{item.delTag,jdbcType=INTEGER}
</foreach>
</insert>
大家帮忙看看是哪里的错误,感谢!!!