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

 

posted @ 2021-06-27 12:38  King-DA  阅读(1309)  评论(0编辑  收藏  举报