增加 community id 参数
This commit is contained in:
parent
bd8a3d90d1
commit
647bf6722a
@ -681,6 +681,7 @@ async def cancel_order(
|
|||||||
async def get_deliveryman_orders(
|
async def get_deliveryman_orders(
|
||||||
status: Optional[str] = None,
|
status: Optional[str] = None,
|
||||||
building_id: Optional[int] = None,
|
building_id: Optional[int] = None,
|
||||||
|
community_id: Optional[int] = None,
|
||||||
skip: int = 0,
|
skip: int = 0,
|
||||||
limit: int = 20,
|
limit: int = 20,
|
||||||
db: Session = Depends(get_db),
|
db: Session = Depends(get_db),
|
||||||
@ -705,6 +706,10 @@ async def get_deliveryman_orders(
|
|||||||
if building_id:
|
if building_id:
|
||||||
query = query.filter(ShippingOrderDB.address_community_building_id == building_id)
|
query = query.filter(ShippingOrderDB.address_community_building_id == building_id)
|
||||||
|
|
||||||
|
# 小区筛选
|
||||||
|
if community_id:
|
||||||
|
query = query.filter(ShippingOrderDB.address_community_id == community_id)
|
||||||
|
|
||||||
# 获取总数
|
# 获取总数
|
||||||
total = query.count()
|
total = query.count()
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user