批量新增
<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>





相关文章:

  • 2022-12-23
  • 2021-11-01
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-14
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-06
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案