https://www.cnblogs.com/quan-coder/p/8728410.html

注意要显式设置主键,通过:

@Options(useGeneratedKeys = true, keyProperty = "id")

将id设置为主键返回。

https://blog.csdn.net/suwu150/article/details/52896496

一个示例(Mapper中的代码片段):

	@Insert("insert into tz_lawsuits " +
"(credit_cooperative, change_date, admin, borrower, borrower_id, guarantee, litigation_principal, type, starting_end_date," +
" lawyer, action_date, litigation_costs, attorney_fees, advance, verdict_id, implementation_date, award_id, takeback_agent_fee," +
" takeback_litigation_costs, takeback_principal, outstanding_principal, responsible_person)" +
" values" +
"(#{credit_cooperative}, #{change_date}, #{admin}, #{borrower}, #{borrower_id}, #{guarantee}, #{litigation_principal}, #{type}, #{starting_end_date}," +
" #{lawyer}, #{action_date}, #{litigation_costs}, #{attorney_fees}, #{advance}, #{verdict_id}, #{implementation_date}, #{award_id}, #{takeback_agent_fee}," +
" #{takeback_litigation_costs}, #{takeback_principal}, #{outstanding_principal}, #{responsible_person})")
@Options(useGeneratedKeys = true, keyProperty = "id")
Integer insertTzLawsuitsObject(TzLawsuits tzLawsuits);

最新文章

  1. PHP批量删除做法
  2. jquery validate ajax submit form
  3. Visual Studio Online Integrations-Planning
  4. 9.0 alpha 版安装出现 could not execute command lessc 的问题
  5. VVDocumenter-Xcode 规范注释生成器 插件之安装调试适应新版本
  6. 干货:yii日志功能详解
  7. Android studio libs目录
  8. Quick Tip: How to Add Syntax Highlighting to Any Project
  9. 属性(Attribute)资源
  10. (转)Spring事务配置的五种方式
  11. python基于万象优图识别图片中的中文
  12. Your project path contains non-ASCII characters
  13. MySQL复制表-CREATE SELECT
  14. HTML(一)
  15. 018-Go将磁盘目录实现简单的静态Web服务
  16. android--------自定义控件 之 属性篇
  17. ClientDataset 三层 var and out arguments must match parameter
  18. 解决linux-mysql 登录时,报异常:Access denied for user 'root'@'localhost'
  19. MindMaster安装教程以及激活破解教程
  20. python 替换指定目录下,所有文本字符串

热门文章

  1. mac下解决中文乱码的问题
  2. Luogu 4751 动态DP 模板
  3. hive on spark (spark2.0.0 hive2.3.3)
  4. 普通页面引入React(使用和不使用JSX)
  5. Oracle数据库限定特定用户 特定IP 登录
  6. 小程序官方基础项目api请求
  7. Linux操作系统常用命令合集——第四篇-文件系统权限操作(5个命令)
  8. 块状链表 bzoj 3343教主的魔法
  9. Count on a tree 树上主席树
  10. 对list某个条件排序,并实现分页