Mysql int类型 传参 取不到正确的值 <if test="state != null and state = 1 ">

             <if test="state != null and state == 1 ">
                 AND d.state != 0
             </if>
             <if test="state != null and state == 0 ">
                 AND d.state = 0
             </if>

 要使用 ==

古人学问无遗力,少壮工夫老始成。 纸上得来终觉浅,绝知此事要躬行。
原文地址:https://www.cnblogs.com/wf-zhang/p/13099722.html