mybatis批量添加xml
<insert id="batchCreate"> INSERT INTO `roomer` (`order`,name,idCard,mobile,timePreCheckin,timePreCheckout,hotel) values <foreach collection="collection" item="item" index="index" separator=","> ( #{item.order,jdbcType=VARCHAR},#{item.name}, #{item.idCard},#{item.mobile},#{item.timePreCheckin}, #{item.timePreCheckout},#{item.hotel,jdbcType=INTEGER}) </foreach> </insert>
时间: 2024-11-10 15:11:53