mybatis保存clob数据

mybatis保存数据库字段为CLOB字段的数据

 

<update id="updateReviewRank" parameterType="java.util.Map">
			UPDATE  T_BL_PRJT_REVIEW SET  
			    <if test="PRRV_ID != null ">PRRV_ID = #{PRRV_ID,jdbcType=NUMERIC} </if> 
			    <if test="PRJT_ID != null ">,PRJT_ID = #{PRJT_ID,jdbcType=NUMERIC} </if> 
			    <if test="PRRV_TYPE != null ">,PRRV_TYPE = #{PRRV_TYPE,jdbcType=VARCHAR} </if> 
			    <if test="GRADE_LEVEL != null ">,GRADE_LEVEL = #{GRADE_LEVEL,jdbcType=VARCHAR} </if> 
			    <if test="GRADE_LEVEL_EN != null ">,GRADE_LEVEL_EN = #{GRADE_LEVEL_EN,jdbcType=VARCHAR} </if> 
			    <if test="GRADE_RESULT != null ">,GRADE_RESULT = #{GRADE_RESULT,jdbcType=VARCHAR} </if> 
			    <if test="PRRV_DATE != null ">,PRRV_DATE = to_date(#{PRRV_DATE,jdbcType=DATE},'yyyy-MM-dd') </if> 
			    <if test="PRRV_LOSEDATE != null ">,PRRV_LOSEDATE = to_date(#{PRRV_LOSEDATE,jdbcType=DATE},'yyyy-MM-dd') </if> 
			    <if test="PRRV_CONCLUSION != null ">,PRRV_CONCLUSION = #{PRRV_CONCLUSION,jdbcType=VARCHAR} </if> 
			    <if test="INITATOR != null ">,INITATOR = #{INITATOR,jdbcType=NUMERIC} </if> 
			    <if test="RATING_PERSONNEL != null ">,RATING_PERSONNEL = #{RATING_PERSONNEL,jdbcType=NUMERIC} </if> 
			    <if test="CONDITION != null ">,CONDITION = #{CONDITION,jdbcType=VARCHAR} </if> 
			    <if test="VERSION_EXPLAIN != null ">,VERSION_EXPLAIN = #{VERSION_EXPLAIN,jdbcType=CLOB} </if> 
			    <if test="REVIEW_FOLLOWING != null ">,REVIEW_FOLLOWING = #{REVIEW_FOLLOWING,jdbcType=CLOB} </if> 
			    <if test="EXPECTATION != null ">,EXPECTATION = #{EXPECTATION,jdbcType=VARCHAR} </if> 
			    <if test="IS_DELETE != null ">,IS_DELETE = #{IS_DELETE,jdbcType=NUMERIC} </if> 
			    <if test="MODIFICATOR != null ">,MODIFICATOR = #{MODIFICATOR,jdbcType=NUMERIC} </if> 
			    ,MODIFY_DATE  = sysdate 
			    <if test="AUDIT_DATE != null ">,AUDIT_DATE = to_date(#{AUDIT_DATE,jdbcType=DATE},'yyyy-MM-dd') </if> 
			 WHERE     PRRV_ID = #{PRRV_ID,jdbcType=NUMERIC} 
	</update>

 采用<if test="VERSION_EXPLAIN != null ">,VERSION_EXPLAIN = #{VERSION_EXPLAIN,jdbcType=CLOB} </if>就行,非常简单

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值