mybatis时间类型的比较

<if test="beginTestTime != null and endTestTime != null and beginTestTime != '' and endTestTime != ''">
	AND a.test_time BETWEEN #{beginTestTime} AND #{endTestTime}
</if>
<if test="(beginTestTime == null or beginTestTime == '') and endTestTime != null and endTestTime != ''">
	<![CDATA[ 
	     and a.test_time <= #{endTestTime}
	]]>
</if>
<if test="beginTestTime != null and beginTestTime != '' and (endTestTime == null or endTestTime == '')">
	<![CDATA[ 
	    and a.test_time >= #{beginTestTime}
	]]>
</if>

  

posted on 2018-01-04 14:17  大山008  阅读(11429)  评论(0编辑  收藏  举报