<insert id="insertBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Thu Aug 16 11:12:53 CST 2018.
-->
insert into admUser (name, mobile,
realname, add_time, up_time,
is_delete)
values
<foreach collection="list" item="item" index="index" separator=",">
(#{item.name,jdbcType=NVARCHAR}, #{item.mobile,jdbcType=NVARCHAR},
#{item.realname,jdbcType=NVARCHAR}, #{item.addTime,jdbcType=BIGINT}, #{item.upTime,jdbcType=BIGINT},
#{item.isDelete,jdbcType=BIT})
</foreach>
</insert>
备注:数据库一次insert只支持1000条,所以用这个批量时,要判断是否超过一千,超过就要分批插入