关于mybatis 中if 标签不生效的问题 在标签内进行字符串比较的时候,标签内容总是不走下一个判断,代码如下: <if test="extend == '-1'"> and wpc.f_print_count IS NULL </if> 字符串比较的时候,比较内容应该使用双引号而不是单引号,如下: <if test='extend == "-1"'> and wpc.f_print_count IS NULL </if>