Files
guke a563c1ca4b @ (#111)
docs/api目录文档分类和补全

---------

Co-authored-by: guke <guke@autohome.com.cn>
Reviewed-on: #111
2026-07-03 15:00:37 +08:00

1.9 KiB
Raw Permalink Blame History

GET /admin/api/withdraws — 提现单列表(游标分页)

所属:Admin·提现 组(前缀 /admin/api/withdraws | 鉴权:Bearer admin_token(角色:任意已登录管理员,列表为只读,仅需 get_current_admin,无 require_role | ← 返回 API 索引

跨用户查询全量提现单,可按 user_id / status 过滤。游标分页(id 倒序)。

入参(query

字段 类型 必填 默认 说明
user_id int null 按用户过滤;不传则查全量
status string null 按状态过滤(如 pending / success / failed
limit int 20 1100
cursor int null 上一页 next_cursor(查 id < cursor

出参

响应 200:{ items: WithdrawOrderOut[], next_cursor: int|null }next_cursor=null 表示末页)

WithdrawOrderOut

字段 类型 说明
id int 提现单主键
user_id int 所属用户
out_bill_no string 商户提现单号(业务主键,重试/对账以此为准)
amount_cents int 提现金额,单位:
status string 单状态(pending / success / failed
wechat_state string | null 微信侧转账状态(如 ACCEPTED / PROCESSING / WAIT_USER_CONFIRM / SUCCESS
transfer_bill_no string | null 微信转账单号
fail_reason string | null 失败/退款原因
created_at datetime 创建时间(ISO 8601 UTC
updated_at datetime 更新时间(ISO 8601 UTC

错误码

  • 401 未带/无效/过期 admin token、管理员被禁用(响应头带 WWW-Authenticate: Bearer
  • 422 query 参数校验失败(如 limit 越界、类型错误)

说明

关联 withdraw_order。金额单位为分。