1
This commit is contained in:
parent
9e1bd782ab
commit
206754a13d
@ -1363,7 +1363,7 @@ async def get_deliveryman_order_summary(
|
|||||||
"today_count": today_total
|
"today_count": today_total
|
||||||
})
|
})
|
||||||
|
|
||||||
@router.get("/deliveryman/check_new/orders", response_model=ResponseModel)
|
@router.get("/deliveryman/check_new_order", response_model=ResponseModel)
|
||||||
async def check_new_orders(
|
async def check_new_orders(
|
||||||
db: Session = Depends(get_db),
|
db: Session = Depends(get_db),
|
||||||
deliveryman: UserDB = Depends(get_deliveryman_user)
|
deliveryman: UserDB = Depends(get_deliveryman_user)
|
||||||
@ -1374,5 +1374,6 @@ async def check_new_orders(
|
|||||||
order_ids = redis_client.pop_orders_from_queue(deliveryman.community_id, 10)
|
order_ids = redis_client.pop_orders_from_queue(deliveryman.community_id, 10)
|
||||||
|
|
||||||
return success_response(data={
|
return success_response(data={
|
||||||
"has_new_order": len(order_ids) > 0
|
"has_new_order": len(order_ids) > 0,
|
||||||
|
"order_ids": order_ids
|
||||||
})
|
})
|
||||||
|
|||||||
@ -20,7 +20,7 @@ app = FastAPI(
|
|||||||
title="Beefast 蜂快到家",
|
title="Beefast 蜂快到家",
|
||||||
description="API 文档",
|
description="API 文档",
|
||||||
version="1.0.0",
|
version="1.0.0",
|
||||||
docs_url="/api/docs" if settings.DEBUG else None
|
docs_url="/docs" if settings.DEBUG else None
|
||||||
)
|
)
|
||||||
|
|
||||||
app.default_response_class = CustomJSONResponse
|
app.default_response_class = CustomJSONResponse
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user