1. 程式人生 > >mybatis中 bit類型判斷

mybatis中 bit類型判斷

spa comm != myba ati pan lse rec light

<if test="recommend != null and recommend == true">
        and g.recommend = 1
     </if>
    <if test="recommend != null and recommend == false">
        and g.recommend = 0
     </if>

 recommend類型是bit類型,判斷時只能用0(代表false)或者1 (true)

mybatis中 bit類型判斷