This commit is contained in:
aaron 2025-03-17 12:48:53 +08:00
parent b409bffbed
commit 8176f94447
2 changed files with 5 additions and 1 deletions

View File

@ -202,7 +202,11 @@ async def pre_order(
):
try:
# 检查是否在服务时间
# 检查delivery_date是否是今天以前的日期则提示重新选择
if request.delivery_date and request.delivery_date < datetime.now().date():
return error_response(code=400, message="配送日期不能选择过去的时间")
# 检查是否在服务时间
community = db.query(CommunityDB).filter(
CommunityDB.id == request.community_id
).first()

Binary file not shown.