其他分享
首页 > 其他分享> > 2021-10-22

2021-10-22

作者:互联网

dao xml文件

<update id="edit" parameterType="com.itheima.pojo.CheckGroup">
        update t_checkgroup
        <set>
            <if test="code != null">
                code=#{code},
            </if>
            <if test="name != null">
                name = #{name},
            </if>
            <if test="helpCode != null">
                helpCode=#{helpCode},
            </if>
            <if test="sex != null">
                sex=#{sex},
            </if>
            <if test="remark != null">
                remark=#{remark},
            </if>
            <if test="attention != null">
                attention=#{attention},
            </if>
        </set>
        where id=#{id}
    </update>

之前if里面的语句没有加逗号
报了如下错

标签:10,remark,code,22,attention,sex,2021,helpCode,id
来源: https://blog.csdn.net/oxzvxng/article/details/120903597