mybatis 批量插入数据到oracle报 ”java.sql.SQLException: ORA-00933: SQL 命令未正确结束“ 错误解决方法
<insert id="insertReconciliationDate" parameterType="List">
insert into tb_wechat_reconciliation
(wxid,mch_id,son_mch_id,transaction_hour,device_no,
wx_orderno, mch_orderno,openid,trade_type,return_code,
payment_bank,currency,total_fee,enterprises_red_amount,wx_refund_no,
mch_refund_no,refund_total_fee, refund_enterprises_red_amount,refund_type,refund_state,
commodity_name, mch_data_pack,poundage,rates,state)
<foreach collection="list" item="item" index="index" separator="union all">
(select #{item.wxid},#{item.mchId},#{item.sonMchId},#{item.transactionHour},#{item.deviceNo},
#{item.wxOrderno},#{item.mchOrderno},#{item.openid},#{item.tradeType},#{item.returnCode},
#{item.paymentBank},#{item.currency},#{item.totalFee},#{item.enterprisesRedAmount},#{item.wxRefundNo},
#{item.mchRefundNo},#{item.refundTotalFee},#{item.refundEnterprisesRedAmount},#{item.refundType},#{item.refundState},
#{item.commodityName},#{item.mchDataPack},#{item.poundage},#{item.rates},#{item.state} from dual)
</foreach>
</insert>