mybatis报错,You have an error in your SQL syntax;

img

img


自认为写的貌似没问题,不知道为啥报错,难道是空格?

<update id="updatePromotionAd" parameterType="com.lagou.domain.PromotionAd">
        update 'promotion_ad'
        <set>
            <if test="name != null">
                name = #{name},
            </if>
            <if test="spaceId != null">
                spaceId = #{spaceId},
            </if>
            <if test="keyword != null">
                keyword = #{keyword},
            </if>
            <if test="htmlContent != null">
                htmlContent = #{htmlContent},
            </if>
            <if test="text != null">
                text = #{text},
            </if>
            <if test="link != null">
                link = #{link},
            </if>
            <if test="startTime != null">
                startTime = #{startTime},
            </if>
            <if test="endTime != null">
                endTime = #{endTime},
            </if>
            <if test="updateTime != updateTime">
                updateTime = #{updateTime},
            </if>
            <if test="status != null">
                status = #{status},
            </if>
            <if test="priority != null">
                priority = #{priority},
            </if>
            <if test="img != null">
                img = #{img},
            </if>
        </set>
        <where>
            <if test="id != null">
                id = #{id}
            </if>
        </where>
    </update>


update 'promotion_ad'换成update promotion_ad或者update promotion_ad