等于空
<if test="p1 == null">
</if>
不等于空
<if test="p1 != null">
</if>
疑问: p1=100,查询结果是1,为什么不是2 ? 待处理...
<select id="test" resultType="java.lang.String">
select
<if test="p1 == null or p1 = ''">
1
</if>
<if test="p1 != '' and p1 != null">
2
</if>
</select>
END。