<insert id="insert" parameterType="com.mawulou.model.Functions" >
<selectKey keyProperty="pkGlobalId" resultType="String" order="BEFORE">
select replace(uuid(),'-','') from dual
</selectKey>
insert into tbl_function (pk_global_id, name, parent_id,
sort, url)
values (#{pkGlobalId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR},
#{sort,jdbcType=INTEGER}, #{url,jdbcType=VARCHAR})
</insert>
myBatis +mysql自动生成uuid主键
最新推荐文章于 2024-10-09 13:08:50 发布