sql语句更新xml基本写法

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);

 

sql语句更新xml基本写法

上一篇:Spring之AOP


下一篇:Spring之Transaction