1. <insert id="insert" parameterType="com.mawulou.model.Functions" >

  2.  
  3. <selectKey keyProperty="pkGlobalId" resultType="String" order="BEFORE">

  4. select replace(uuid(),'-','') from dual

  5. </selectKey>

  6.  
  7. insert into tbl_function (pk_global_id, name, parent_id,

  8. sort, url)

  9. values (#{pkGlobalId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR},

  10. #{sort,jdbcType=INTEGER}, #{url,jdbcType=VARCHAR})

  11. </insert>

  12. myBatis +mysql自动生成uuid主键

相关文章:

  • 2022-12-23
  • 2022-01-01
  • 2022-12-23
  • 2022-02-12
  • 2022-02-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案