@Insert("") @Options(useGeneratedKeys = true, keyProperty = "id") Integer batchActivityGift(@Param("items")Listitems);
这个会抛异常 Parameter 'id' not found
把 useGeneratedKeys = true 改成 useGeneratedKeys = false
来自:https://www.cnblogs.com/smallstudent/p/5924213.html
https://blog.csdn.net/danchaofan0534/article/details/77095159
以上问题解决了id not found 然而没有达到我想要的 列表返回主键id
@Insert("") @Options(useGeneratedKeys = true, keyProperty = "id",keyColumn="id") Integer batchActiveItem(@Param("list")Listitems);
collection对应的值请使用list
@Param("list")
来自:https://blog.csdn.net/kahhy/article/details/84248354