<update id="updateBlog" parameterType="map"> update blog <set> <if test="title != null"> title = #{title}, </if> <if test="author != null"> author = #{author}, </if> <if test="views != null"> views = #{views}, </if> </set> where id = #{id} </update>