<!--动态字段更新 if test 标签使用-->
<update id="方法名" parameterType="类对象的路径">
update video
<trim prefix="set" suffixOverrides=",">
<if test="title != null">title=#{title,jdbcType=VARCHAR},</if>
<if test="detail != null">detail=#{detail,jdbcType=VARCHAR},</if>
<if test="coverImg != null">cover_img=#{coverImg,jdbcType=VARCHAR},</if>
<if test="price != 0">price=#{price,jdbcType=INTEGER},</if>
<!--若写成 point != null 则类对象中的point 属性 要更改成 Double 大包的形式-->
<if test="point != 0.0">point=#{point,jdbcType=DOUBLE},</if>
</trim>
where id = #{id}
</update>