1.相等的情况
<if test="property!= null and property!= '' ">
and column = #{property}
</if>
2.相似的情况
<if test="property!= null" >
AND column like CONCAT('%',#{property},'%')
</if>
3.CDATA标签内的会被文本解析,如
<if test="property!= null" >
<![CDATA[
and column>= #{property}]]>
</if>
4.时间比较大小
<if test="exeTime != null">
<![CDATA[
and date(exe_time) >= date(#{exeTime})]]>
</if>