mybatis父子表批量插入

本文介绍了如何在MyBatis中进行批量插入父子表的操作,包括调用`batchUpdate`方法传递参数集合实现批量插入,以及在插入主表的同时插入多张字表的场景。详细内容可参考原文链接。
 <!--父子表批量插入  -->
<insert id="insertBatch" parameterType="com.niwopay.dto.benifit.JFOrderVipDTO">
begin
           insert into TB_JF_ORDER
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="orderId != null" >
        ORDER_ID,
      </if>
      <if test="extOrderId != null" >
        EXT_ORDER_ID,
      </if>
      <if test="deviceChannel != null" >
        DEVICE_CHANNEL,
      </if>
      <if test="bizChannel != null" >
        BIZ_CHANNEL,
      </if>
      <if test="orderType != null" >
        ORDER_TYPE,
      </if>
      <if test="userId != null" >
        USER_ID,
      </if>
      <if test="orderDate != null" >
        ORDER_DATE,
      </if>
      <if test="orderAmount != null" >
        ORDER_AMOUNT,
      </if>
      <if test="productAmount != null" >
        PRODUCT_AMOUNT,
      </if>
      <if test="payAmount != null" >
        PAY_AMOUNT,
      </if>
      <if test="fee != null" >
        FEE,
      </if>
      <if test="sales != null" >
        SALES,
      </if>
      <if test="freight != null" >
        FREIGHT,
      </if>
      <if test="deliveryState != null" >
        DELIVERY_STATE,
      </if>
      <if test="orderState != null" >
        ORDER_STATE,
      </if>
      <if test="orderDesc != null" >
        ORDER_DESC,
      </if>
      <if test="remark != null" >
        REMARK,
      </
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值