MyBatis 3判断不为null

<if test="type!=null and type!=''">  
    AND type = #{type}  
</if>  
原文地址:https://www.cnblogs.com/EasonJim/p/7592724.html