mybatis if test非空判断数字0为什么是false

1、去掉空字符串判断

         <if test="version != null">xxxxx</if>

2、添加0值判断

         <if test="version != null and version != '' or version == 0">xxxxx</if>


猜你喜欢

转载自blog.51cto.com/4925054/2326966
0条评论
添加一条新回复