Java 包装类和基本类 直接 默认值

今天 用SPringMVC +mybatis  ,mybatis

 类型设置的是Integer ,设置的值是0,在mapper中 判断,app

<if test="channelType != null and channelType !=''">
            AND CHANNEL_TYPE = #{channelType,jdbcType=VARCHAR}
        </if> 测试

一直进不去,通过测试 发现test

Integer a=0;
        if(a.equals("")){
            System.out.println( a+1 );
        }jdbc

Integer 0=0;map

在进行判断是否为空时,发现为空,但不是null。channel

相关文章
相关标签/搜索