select CREATION_DATE from A
where ${if(len(时间) == 0,"","to_char(CREATION_DATE,'yyyy/mm/dd hh24:mi:ss') <= '时间'")}
order by CREATION_DATE desc,使用小于号的时候能查到数据,改成大于号之后就没有数据,时间都用的是2023/3/20 00:00:00,而且我确定大于2020/3/20 00:00:00是有数据的
where ${if(len(时间) == 0,"","to_char(CREATION_DATE,'yyyy/mm/dd hh24:mi:ss') >= '"+时间+"'")}
order by CREATION_DATE desc
试试