<!-- 插入數據:返回記錄主鍵id值 -->
<insert id="insert" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
insert into stu (name,age) values (#{name},#{age})
</insert>
https://www.cnblogs.com/charlypage/p/11253610.html
https://blog.csdn.net/xy405580364/article/details/102837263
注:並不是返回的數據里獲取id,而是添加的對象里添加成功后會自動添加id
