當MyBatis 判斷條件為等於的時候,常量需要加 .toString() 來轉換,這種方法是穩定的,推薦使用,比如:
<!-- 正確的,穩定,推薦使用 --> <if test="newsImage != null and newsImage == '0'.toString()"> <![CDATA[ and len(newsImage) > 0 ]]> </if>
當MyBatis 判斷條件為等於的時候,常量需要加 .toString() 來轉換,這種方法是穩定的,推薦使用,比如:
<!-- 正確的,穩定,推薦使用 --> <if test="newsImage != null and newsImage == '0'.toString()"> <![CDATA[ and len(newsImage) > 0 ]]> </if>
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。