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

 

posted on 2020-09-22 21:33  AlexLiuF  阅读(1748)  评论(0编辑  收藏  举报