test后面只能使用boolean型的判断,最好是!null判断
select * from t_blog where 1 = 1
and title = #{title}
and content = #{content}
and owner = "owner1"
自己写项目的时候
update
article_collection_status = null,
article_collection_status = 0,
where article_id = #{articleId}
其中的articleCollectionStatus要和articled一样,作为参数传递过来,并且在test使用#{articleCollectionStatus},不然会这个值相关的异常。可能是when或者otherwise后面的执行语句没有用到#{articleCollectionStatus}而是直接写的null和0。百度的例子基本都是content = #{content}这种的。