mybatis的mapper不允许重载,因为它需要通过方法名称[不加签名]去查找需要执行的sql

1.批量删除

  <delete id="deletePlanLocations" parameterType="list" >
delete from plan_location where uuid in
(<foreach collection="list" item="item" separator="," index="index">
#{item, jdbcType=VARCHAR}
</foreach>)
</delete>

2.批量插入

<insert id="insertPlanLocations" parameterType="list" >
insert into plan_location (uuid, location_name, group_id, x,
y, tenant_id,
create_time, create_user_id, update_user_id
) values
<foreach collection="list" item="item" separator="," index="index" >
(#{item.uuid, jdbcType=VARCHAR}, #{item.locationName,jdbcType=VARCHAR},#{item.groupId,jdbcType=INTEGER},
#{item.x,jdbcType=DOUBLE},#{item.y,jdbcType=DOUBLE},
#{item.tenantId,jdbcType=INTEGER},#{item.createTime,jdbcType=TIMESTAMP},
#{item.createUserId,jdbcType=INTEGER},#{item.createUserId,jdbcType=INTEGER})
</foreach>
</insert>

最新文章

  1. Js new到底发生了什么
  2. 简单说说call 与apply
  3. 学习iOS【3】数组、词典和集合
  4. VS2013使用EF6与mysql数据库
  5. jquery1.8在ie8下not无效?
  6. Compass 使用手册
  7. ps命令用法详解(转)
  8. oracle if else 判断
  9. CodeForces 670 A. Holidays(模拟)
  10. linux虚拟机中安装mongodb
  11. 【设计模式】桥接模式 Bridge Pattern
  12. SQL语句整理
  13. 承接教育类html5交互课件/动画/游戏外包——如何快速开发一款html5交互课件/动画产品
  14. c++ 回调函数封装
  15. scss文件使用笔记
  16. Python学习(十八)—— 数据库(三)
  17. count列表中字符出现的次数
  18. AE与C#入门笔记
  19. hdu-6437-最大费用流
  20. python(5)之集合

热门文章

  1. Css中!important的用法
  2. MYSQL中GROUP BY不包含所有的非聚合字段时的注意事项
  3. 7.24 IO多路复用和协程代码笔记
  4. 50.TO_NUMBER 将给出的字符转换为数字
  5. CSU 1804 - 有向无环图 - [(类似于)树形DP]
  6. ZOJ 3985 - String of CCPC - [字符串处理]
  7. CCCC L2-022. 重排链表
  8. 《前端JavaScript面试技巧》笔记一
  9. 常用的windows注册表大全
  10. AppFog使用