mybatis条件查询参数为0时没有识别

Integer类型值为0时应该这样判断

<if test="userSex !=null and '' != userSex or userSex==0">
      AND sex = #{userSex}