mybatis

---批量插入数据返回一个相同的插入id
<!-- 插入数据到临时表 -->
<insert id="smallcontractManage.filialeSecond.insertTmpInfo" parameterClass="java.util.Map">
    <selectKey resultClass="string" keyProperty="userid">
select sys_guid() as id from dual
    </selectKey>
<![CDATA[
   insert into tmp_info()values()
       ]CDATA]!>
    <iterate conjunction=" union all " property="list">
<![CDATA[  select * from a
       ]CDATA]!>
    </iterate>
</insert>

你可能感兴趣的:(mybatis)