如下:
<insert id="insertSelective" parameterType="com.xx.xx.OrderBusinessPO">
<selectKey keyProperty="orderId" order="AFTER" resultType="java.lang.Long">
select LAST_INSERT_ID()
</selectKey>
insert into order_business (insert 语句)
......
</insert>
<insert id="insert" parameterType="publicSeaClueModel">
insert into clue_pub_sea (
clue_id,
remove_sensitive_two
)
VALUES
(
#{clueId},
#{removeSensitiveTwo}
)
<selectKey resultType="java.lang.Long" keyProperty="clueId">
SELECT LAST_INSERT_ID()
</selectKey>
</insert>