<if test="timestart!=null and timestart!=''">
<![CDATA[ and a.CREATDATE >= TO_DATE(#{timestart}, 'yyyy-MM-dd hh24:mi:ss') ]]>
</if>
<if test="timeend!=null and timeend!=''">
<![CDATA[ and a.CREATDATE <= TO_DATE(#{timeend}, 'yyyy-MM-dd hh24:mi:ss') ]]>
<![CDATA[ and a.CREATDATE >= TO_DATE(#{timestart}, 'yyyy-MM-dd hh24:mi:ss') ]]>
</if>
<if test="timeend!=null and timeend!=''">
<![CDATA[ and a.CREATDATE <= TO_DATE(#{timeend}, 'yyyy-MM-dd hh24:mi:ss') ]]>
</if>
order by TO_DATE(${sort}, 'yyyy.MM.dd')
The time range is set between #{timestart} and #{timeend}, use to_date to convert ${sort}, and convert the string time into a format that Oracle can recognize.