今天在使用mybatis时遇到一个问题,java代码中传递的整数0在mybatis中被识别成null
- <where>
- <if test="status != null and status !=''">
- and status=#{status,jdbcType=INTEGER}
- </if>
- </where>
- <where>
- <if test="status != null and status !='' or status==0">
- and status=#{status,jdbcType=INTEGER}
- </if>
- </where>