<!-- 添加用户(注册) -->
<insert id="regist" parameterType="com.deppon.myDeppon.module.user.shared.domain.User">
<selectKey keyProperty="id" resultType="string" order="BEFORE">
select sys_guid() as id from dual
</selectKey>
INSERT INTO t_web_customerinfo(FID,FUSERNAME,FPASSWORD,FEMAIL,FCREATETIME,FLASTUPDATETIME,FLASTLOGINTIME,FAUDITSTATUS)
VALUES(
#{id,jdbcType=VARCHAR},
#{userName,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR},
#{email,jdbcType=VARCHAR},
#{regiterTime,jdbcType=TIMESTAMP},
#{lastUpdateTime,jdbcType=TIMESTAMP},
#{lastLoginTime,jdbcType=TIMESTAMP},
sysdate,
sysdate,
sysdate,
#{status,jdbcType=INTEGER}
)
</insert>
和sql语句基本上是一样的,不同的是values变成参数化了,参数类型要支持jdbc。