<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)
<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)
转载于:https://www.cnblogs.com/hjy2018/p/9734936.html