当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删除。