关于mybatis-当if语句判断条件中传入0时,跳过判断的问题
摘要:经查资料发现,mybatis判断整数为0时,不进入该条件 <if test="id != null and id != '' "> and id = #{id} </if> 原因: 在mybatis中会自动把0当成null,所以if判断为false(而且只有查询字段类型为long 或者 Intege
阅读全文
posted @ 2021-11-10 18:26