参考
https://blog.csdn.net/phantomes/article/details/70761603
示例语句:没在数据库里建立触发器,ID是从自己建立的 STUDENT_SEQ 序列中获取的
<insert id="batchInsertStudent" parameterType="java.util.List">
BEGIN
<foreach collection="list" item="item" index="index" separator="">
INSERT INTO STU
(
ID,
NAME,
AGE
)
VALUES
(
STUDENT_SEQ.NEXTVAL,
#{item.name},
#{item.age}
);
</foreach>
COMMIT;
END;
</insert>