mosakashaka

status是Integer类型。

一开始传入0的时候,发现这个判断语句走不进去,但是传1是好的:

    <if test="status != null and status != \'\'">
        and c.status = #{status}
    </if>

后来修改为

    <if test="status != null">
        and c.status = #{status}
    </if>

则0和1都可以

所以数字判断的时候,应该是只要判断非空就可以。

分类:

技术点:

相关文章: