当传入的查询条件的值为整型时
private Integer examine;
mybatis里的<if>标签做判断时,传入的值为0
<if test="examine != null and examine != ''">
and examine = #{examine}
</if>
以上判断会将条件卡住进不去,因此该条sql不会拼接该条件
因为0在mybatis里等于 ’ '(空字符串)
所以应该写成
<if test="examine != null">
and examine = #{examine}
</if>