sql语句更新xml基本写法

时间:2021-06-28 19:45:46   收藏:0   阅读:0

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

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!