mybatis IF判斷

【mybatis】IF判斷的坑
http://cheng-xinwei.iteye.com/blog/2008200

<if test="type=='1'">  
    and status ='ok'    
</if>  

以上代碼無論如何是執行不了的,
應改爲

<if test='type=="1"'>  
    and status ='ok'    
</if>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章