mybatis新增时将主键值返回(注解方式)
生活随笔
收集整理的這篇文章主要介紹了
mybatis新增时将主键值返回(注解方式)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
mybatis新增時將主鍵值返回:
@Insert("insert into driver_account_appeal (driver_id,driver_name,driver_phone,content,order_id,org_id,cooperation_Company_Id,cooperation_Company_Name,appeal_Time,punishment_Id)\n" +"VALUES(#{driverId},#{driverName},#{driverPhone},#{content},#{orderId},#{orgId},#{cooperationCompanyId},#{cooperationCompanyName},NOW(),#{punishmentId})") @Options(useGeneratedKeys=true, keyProperty="id", keyColumn="id")//新增時將主鍵返回 void addAppeal(Appeal appeal);總結
以上是生活随笔為你收集整理的mybatis新增时将主键值返回(注解方式)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Mybatis注解实现一对多关联映射(@
- 下一篇: MongoRepository find