批量新增
<insert ), #{item.username}, #{item.time})
</foreach>
</insert>
注释
list 传过来的集合对象
item="item" "item" 遍历的集合中的每个对象
---------------------------------------------------------------------------------------------------------
新增返回主键id (useGeneratedKeys="true" keyProperty="id")
<insert >批量修改
list - 传过来的数据集合,使用注解
goods_id 表中数据
goodsId 对应的实体类属性
<update >
#{item.goodsId}
</foreach>
</update>