MYBATIS中if test判斷中的注意事項

mybatis中有這樣一個SQL判斷,web <if test="status != null and status !='' "> and a.STATUS = #{status,jdbcType=SMALLINT} </if> status是一個Byte類型對象,當status = 1時判斷成立,status=0 就不成立,按理說都應該成立的。本身試着把status !=’’ 去掉以後就都成立
相關文章
相關標籤/搜索