mybatis int类型传0的时候,判断为空
例如:
< if test=“dispostiontype != null and dispostiontype != ‘’”>
dispostiontype =#{dispostiontype },
< /if>
dispostiontype 为int类型时, 传0 , 会自动判断 dispostiontype 为""
修改方法:
< if test="dispostiontype != null >
dispostiontype =#{dispostiontype },
< /if>
或
< if test=“dispostiontype != null and dispostiontype != ‘’ or dispostiontype == 0”>
dispostiontype =#{dispostiontype },
< /if>