You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/07/15 06:07:20 UTC

[GitHub] [shardingsphere] lcx1989210 edited a comment on issue #6351: Just return one ID when batch insert at shardingsphere 4.1.1

lcx1989210 edited a comment on issue #6351:
URL: https://github.com/apache/shardingsphere/issues/6351#issuecomment-658565000


   I use mybatis as the persistence layer.And the config is :
   ![image](https://user-images.githubusercontent.com/21120592/87509424-1a83c180-c6a4-11ea-94eb-7d7dfc9c87e9.png)
   
    <insert id="insetConsumeLog" useGeneratedKeys="true" keyProperty="id">
           insert into consume (user_id, user_type,
           balance_id, order_id, amount,
           consume_at, consume_key, consume_token,
           product_code, citys, categorys,
           status, created_at, modified_at,
           extension1, extension2, keep_at,info_id
           )
           values
           <foreach collection="list" item="c" separator=",">
               (#{c.userId}, #{c.userType},
               #{c.balanceId}, #{c.orderId}, #{c.amount},
               #{c.consumeAt}, #{c.consumeKey}, #{c.consumeToken},
               #{c.productCode}, #{c.citys}, #{c.categorys},
               #{c.status}, #{c.createdAt}, #{c.modifiedAt},
               #{c.extension1}, #{c.extension2}, #{c.keepAt},#{c.infoId}
               )
           </foreach>
       </insert>
    And mybatis version is 3.4.2.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org