字符格式为例:
1、不为空的判断如下:
<if test="status != null and status != ''"> and status = #{status}</if>
2、如果判断,某个属性等于某个值,就不能上面的方法中的引号了。
错误写法:
<if test="status =='yes'">
and xxxx相关逻辑
</if>
正确写法:
<if test='status =="yes"'>
and xxxx相关逻辑
</if>