Mybatis的if test字符串比较问题

1. Mybatis判断字符串是否为空的变态写法

    <if test="bussSceneIsNull =='0'.toString() ">

       <![CDATA[ and (t4.BUSS_SCENE = null or t4.BUSS_SCENE = '')]]>

    </if>

 

2. 第二种变态写法

    <if test='bussSceneIsNull == "" '>

       <![CDATA[ and (t4.BUSS_SCENE = null or t4.BUSS_SCENE = '')]]>

    </if>

 

posted @ 2016-02-24 09:47  沙漏哟  阅读(1066)  评论(0编辑  收藏  举报