feat(fulfillment): 展示可分配账号库存
This commit is contained in:
@@ -141,6 +141,17 @@ def list_tasks(
|
||||
)
|
||||
|
||||
|
||||
@router.get("/account-availability")
|
||||
def get_account_availability(
|
||||
commodity_ids: str = Query("", max_length=8192),
|
||||
db: Session = Depends(get_db),
|
||||
current: User = Depends(require_permission("platform_fulfillment:admin")),
|
||||
) -> dict[str, Any]:
|
||||
del current
|
||||
ids = [item.strip() for item in commodity_ids.split(",") if item.strip()]
|
||||
return service.get_account_availability(db, commodity_ids=ids)
|
||||
|
||||
|
||||
@router.post("/sync")
|
||||
def sync_tasks(
|
||||
limit: int = Query(100, ge=1, le=500),
|
||||
|
||||
Reference in New Issue
Block a user