❤️orace mybatis日期查询

小明的学习圈子2023-08-12数据库总结 Oracle

orace mybatis日期查询

<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) > 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) < 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) >= trunc(to_date(#{BEGIN_DATE},'yyyy-MM-dd'))
</if>
<if test="END_DATE !=null and END_DATE !=''">
AND trunc(TCRT.END_TIME) <= trunc(to_date(#{END_DATE},'yyyy-MM-dd'))
</if>
Last Updated 2024/4/6 10:47:15