您的位置: 首页 > 文章 > Mybatis | Mybatis映射文件中传入参数为Integer类型,当判断该值!= null and != ‘‘时会导致运行时忽略该if标签 Mybatis | Mybatis映射文件中传入参数为Integer类型,当判断该值!= null and != ‘‘时会导致运行时忽略该if标签 分类: 文章 • 2024-05-23 08:24:46 Mybatis版本 3.4.2 state为Integer类型 Dao Mapper 此时正常走<if test="state != null">的判断 当把判断改为<if test="state != null and state !=''"> 此时将不走判断,但是理论加了and state !=''也不能算错