mybatis中if标签使用大于小于 大于:gt 小于:lt <select id="list" resultType="com.test.bean.beanDemo"> SELECT id, name, age FROM user_test <where> <if test="age!= null AND age lt 20"> AND age= #{age} </if> <if test="age!= null AND age gt 19"> AND age >= #{age} </if> </where> </select>