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>就行,非常简单