<selectKey keyProperty="id" resultType="int" order="AFTER">
            select LAST_INSERT_ID()
</selectKey>

直接在插入SQL里面加

相关文章: