問題:
money_search_end != ‘0’
為0時依然繼續執行
解決方案:
1.單個字符要用''.toString()
2.用雙引號“”,當然text的引號要改為單引號‘’
<if test="money_search_start != null and money_search_start != '' and money_search_start != '0'.toString()"> and acc.money <![CDATA[ >= ]]> #{money_search_start} </if> <if test='money_search_end != null and money_search_end != "" and money_search_end != "0" '> and acc.money <![CDATA[ <= ]]> #{money_search_end} </if>