当MyBatis 判断条件为等于的时候,常量需要加 .toString() 来转换,这种方法是稳定的,推荐使用,比如:

<!-- 正确的,稳定,推荐使用 -->  
<if test="newsImage != null and newsImage == '0'.toString()">  
    <![CDATA[ and len(newsImage) > 0 ]]>  
</if> 

参考网址

相关文章:

  • 2021-10-08
  • 2022-02-15
  • 2022-01-19
  • 2021-04-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-17
相关资源
相似解决方案