update
This commit is contained in:
parent
f210d12453
commit
494b7573a3
@ -130,8 +130,10 @@ async def get_community_time_periods(
|
||||
# 获取今日订单数量
|
||||
today_orders_count = redis_client.get_community_period_orders_count(today_date,ctp.CommunityTimePeriodDB.id)
|
||||
|
||||
# 当前时间 < 配送时段结束时间前半小时
|
||||
if datetime.now().time() > ctp.time_period_to_time - timedelta(hours=0.5):
|
||||
# 当前时间 < 配送时段结束时间前半小时 #datetime.time数据类型是 time
|
||||
dt = datetime.combine(datetime.today(), ctp.time_period_to_time)
|
||||
dt = dt - timedelta(hours=0.5)
|
||||
if datetime.now().time() > dt.time():
|
||||
tomorrow_count+=1
|
||||
continue
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user