feat(fulfillment): 展示可分配账号库存

This commit is contained in:
yml
2026-11-28 22:22:35 +08:00
parent 53626e4c2c
commit c51dec8a94
10 changed files with 550 additions and 20 deletions
@@ -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),