sql語句更新xml基本寫法
<mapper namespace="com.keyou.dao.samSystem.SamApplyDao"> <update id="updateRejectSamApply"> UPDATE SAM_APPLY <trim prefix="set" suffixOverrides=","> <if test="samApplyRejectInputParam.rejectOpinion!=null"> SAM_APPLY.REJECTOPINION=#{samApplyRejectInputParam.rejectOpinion}, </if> </trim> <where> <if test="samApplyRejectInputParam.applyguid!=null"> SAM_APPLY.APPLYGUID=#{samApplyRejectInputParam.applyguid} </if> </where> </update> </mapper>
入參對象samApplyRejectInputParam與接口方法中的@param標志的參數對應如
boolean updateRejectSamApply(@Param("samApplyRejectInputParam")SAMApplyRejectInputParam samApplyRejectInputParam);