<keyProperty="id" resultType="INTEGER">
         select LAST_INSERT_ID()
  </keyProperty>
   放在insert语句之前

  keyProperty ---数据库主键属性

在Controller直接拿对象就可以获取自增列的值

Integer id = companyPositionInfo.getId();

相关文章:

  • 2021-10-28
  • 2021-05-18
  • 2022-12-23
  • 2021-10-27
  • 2022-12-23
  • 2021-08-31
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-30
  • 2022-12-23
  • 2021-05-06
  • 2022-12-23
  • 2021-08-04
相关资源
相似解决方案