Files
shaguabijia-app-server/docs/api/admin/wallet/admin-wallet-cash-transactions.md
T
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.7 KiB
Raw Blame History

GET /admin/api/wallet/cash-transactions — 现金流水(游标分页)

所属:Admin·钱包 组(前缀 /admin/api/wallet | 鉴权:Bearer admin_token(角色:任意已登录管理员,仅需 get_current_admin,无 require_role | ← 返回 API 索引

跨用户查询全量现金流水,可按 user_id / biz_type 过滤。游标分页(id 倒序)。金额单位一律为

入参(query

字段 类型 必填 默认 说明
user_id int null 按用户过滤;不传则查全量
biz_type string null 按业务类型过滤
limit int 20 1100
cursor int null 上一页 next_cursor(查 id < cursor

出参

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

CashTxnOut

字段 类型 说明
id int 流水主键
user_id int 所属用户
amount_cents int 现金变动量,单位:(正/负)
balance_after_cents int 本次变动后现金余额,单位:
biz_type string 业务类型
ref_id string | null 关联业务 ID
remark string | null 备注
created_at datetime 创建时间(北京 wall-clock naive,非 UTC;前端按字面显示,不做时区换算)

错误码

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

说明

关联 cash_transaction。所有金额字段单位为分。