orace日期查询

<if test="STATE !=null and STATE !=''">
<if test="STATE == 5 or STATE == '5'">
AND TCRT.STATE = #{STATE}
</if>
<if test="STATE == 4 or STATE == '4'">
AND TCRT.STATE = '4'
AND trunc(TCRT.END_TIME) &gt; trunc(to_date(TO_CHAR(sysdate,'YYYY-MM-DD'),'YYYY-MM-DD'))
</if>
<if test="STATE == 6 or STATE == '6'">
AND TCRT.STATE = '4'
AND trunc(TCRT.END_TIME) &lt; trunc(to_date(TO_CHAR(sysdate,'YYYY-MM-DD'),'YYYY-MM-DD'))
</if>
</if>
<if test="BEGIN_DATE !=null and BEGIN_DATE !=''">
AND trunc(TCRT.END_TIME) &gt;= trunc(to_date(#{BEGIN_DATE},'yyyy-MM-dd'))
</if>
<if test="END_DATE !=null and END_DATE !=''">
AND trunc(TCRT.END_TIME) &lt;= trunc(to_date(#{END_DATE},'yyyy-MM-dd'))
</if>

 

posted @ 2018-11-24 14:03  程序员小明1024  阅读(216)  评论(0编辑  收藏  举报