要根据时间筛选3个字段,不能直接筛选数据库的字段,所以在代码里面加了几个字段,有多种筛选方法。
一个是一次晒3个
<if test="createDateTime != null">
<if test="createDateTime.startDate != null">
and t.create_time >= to_timestamp(#{
createDateTime.startDate},'yyyy-MM-dd hh24:mi:ss')
</if>
<if test="createDateTime.endDate != null">
and t.create_time <= to_timestamp