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