今天 用SPringMVC +mybatis ,
类型设置的是Integer ,设置的值是0,在mapper中 判断,
<if test="channelType != null and channelType !=''">
AND CHANNEL_TYPE = #{channelType,jdbcType=VARCHAR}
</if>
一直进不去,经过测试 发现
Integer a=0;
if(a.equals("")){
System.out.println( a+1 );
}
Integer 0=0;
在进行判断是否为空时,发现为空,但不是null。