当前位置:Gxlcms > 数据库问题 > SSM+Oracle自动生成uuid作为主键

SSM+Oracle自动生成uuid作为主键

时间:2021-07-01 10:21:17 帮助过:27人阅读

mapper.xml实例

 

<insert id="insert" parameterType="net.topcheer.module.entity.TsOperateLog">
    <selectKey resultType="String" keyProperty="id" order="BEFORE">
      select rawtohex(sys_guid()) from dual
    </selectKey>
    insert into TS_OPERATE_LOG (ID, OPERATE_USER_ID, OPERATE_USER_NAME,
                                IP, DEVICE, BROWSER, OPERATE_CONTENT)
    values (#{id,jdbcType=VARCHAR}, #{operateUserId,jdbcType=OTHER}, #{operateUserName,jdbcType=VARCHAR},
      #{ip,jdbcType=VARCHAR}, #{device,jdbcType=VARCHAR},
      #{browser,jdbcType=VARCHAR}, #{operateContent,jdbcType=VARCHAR})
  </insert>

 

SSM+Oracle自动生成uuid作为主键

标签:pch   for   bsp   gui   param   strong   parameter   获取   ring   

人气教程排行