本文共 592 字,大约阅读时间需要 1 分钟。
<insert id="insertAddressPosition" parameterType="java.util.List"> <selectKey keyProperty="p1" order="BEFORE" resultType="int"> select seq_app_addresslist.nextval from dual </selectKey> insert into appuser.ADDRESS_POSITION_BACKUP (row_id,pos_id,pos_name,create_date,update_date) <foreach collection="list" item="pop" separator="union all" open="(" close=")"> select #{p1},#{pop.ROLE_ID,jdbcType=VARCHAR},#{pop.ROLE_NAME,jdbcType=VARCHAR}, sysdate,sysdate from dual </foreach> </insert>