mybatis BUG之 if标签判断 0 时不生效

mybatis 的 if 标签 在遇到 传入值 为 0 时,会按 空处理,导致 你在根据状态查询时,sql 语句 不会有 状态 为  0 的查询条件;需要手动的更改 判断; or 字段名 == 0 select * from tableName where status != 1 <if test="type != null and type != '' or type == 0">
相关文章
相关标签/搜索