<!--新增列,新增时把生成的主键也带赋值进去,在调用insert处可以看到主键值-->
<insert id="insert" parameterType="com.*.*.*.entity.VaTravel">
<selectKey keyProperty="eipGuid" resultType="String" order="BEFORE">
select sys_guid() as eipGuid from dual
</selectKey>
insert into *.tableName(EIP_GUID, EIP_TIME, EIP_USER, EIP_LTIME, EIP_LUSER, EIP_GC, APPLY_ID, VISITOR_ID, PROVINCE,
CITY, COUNTY, ARRIVE_TIME, LEAVE_TIME)
values (#{eipGuid,jdbcType=VARCHAR},#{eipTime,jdbcType=TIMESTAMP}, #{eipUser,jdbcType=VARCHAR}, #{eipLtime,jdbcType=TIMESTAMP},
#{eipLuser,jdbcType=VARCHAR}, #{eipGc,jdbcType=VARCHAR}, #{applyId,jdbcType=VARCHAR},
#{visitorId,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR},
#{county,jdbcType=VARCHAR}, #{arriveTime,jdbcType=TIMESTAMP}, #{leaveTime,jdbcType=TIMESTAMP})
</insert>
这个时候就可以不用在Oracle中设置主键的默认值了