mybatis

<insert id="add" parameterType="com.valueobject.tmo.OBusiness">
<selectKey keyProperty="businessSn" resultType="string"
order="BEFORE">
select fn_get_business_no from dual
</selectKey>
insert into SYPAY_OFFLINE_BUSINESS
(
BUSINESS_SN, END_TIME UPDATE_DATE
)
values
(
#{businessSn},
sysdate,
systimestamp
)
</insert>

<insert id="add">
insert all
<foreach collection="detailList" item="detail">
into
sowd
(business_sn, end_time, update_time)
values
(#{businessSn,jdbcType=VARCHAR},
sysdate, sysdate)
</foreach>
select 1 from dual
</insert>

你可能感兴趣的:(mybatis)