日期问题

This commit is contained in:
2024-12-30 18:26:40 +08:00
parent d3241cf504
commit f154973d2d
3 changed files with 9 additions and 5 deletions

View File

@@ -127,13 +127,13 @@
and o.sys_user_id=#{sysUserId}
</if>
<if test="startTime!=null and startTime!='' and endTime!=null and endTime!=''">
and date_format(o.create_time,'%Y-%m-%d') BETWEEN #{startTime} and #{endTime}
and o.create_time BETWEEN #{startTime} and #{endTime}
</if>
<if test="startTime!=null and startTime!='' and (endTime==null or endTime=='')">
and date_format(o.create_time,'%Y-%m-%d') &gt;= #{startTime}
and o.create_time &gt;= #{startTime}
</if>
<if test="endTime!=null and endTime!='' and (startTime==null or startTime=='')">
and date_format(o.create_time,'%Y-%m-%d') &lt;= #{endTime}
and o.create_time &lt;= #{endTime}
</if>
order by o.create_time desc
</select>