v3-admin-credit-accounts.yaml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-admin-credit-accounts.yaml
  2. get:
  3. summary: 列出积分账号
  4. tags:
  5. - admin
  6. operationId: get_api_v3_admin_credit_accounts
  7. description: |-
  8. 有积分流水的账号(登录用户与游客设备),每行是该账号的汇总:积分余额、累计赚取、累计手工调整、
  9. 累计消耗、今天用掉的赠送额度。最近有动静的在前。没有任何流水的用户不在列表里,
  10. 但仍可以直接给他加积分(`POST /v3/admin/credit-adjustments`)。
  11. 实现:`V3\AdminCreditAccountController@index`
  12. security:
  13. -
  14. bearerAuth: []
  15. parameters:
  16. -
  17. name: per_page
  18. in: query
  19. schema:
  20. type: integer
  21. default: 20
  22. description: '每页数量,最大 100'
  23. -
  24. name: 'filter[account_type]'
  25. in: query
  26. schema:
  27. type: string
  28. enum:
  29. - user
  30. - guest
  31. description: 账号类型
  32. -
  33. name: 'filter[q]'
  34. in: query
  35. schema:
  36. type: string
  37. description: '登录用户按用户名 / 昵称 / 邮箱模糊匹配,游客按设备 id 前缀匹配'
  38. -
  39. name: page
  40. in: query
  41. schema:
  42. type: integer
  43. default: 1
  44. description: 页码
  45. responses:
  46. 200:
  47. description: 成功
  48. content:
  49. application/json:
  50. schema:
  51. type: object
  52. properties:
  53. data:
  54. type: array
  55. items:
  56. type: object
  57. properties:
  58. account_type:
  59. type: string
  60. enum: [user, guest]
  61. account_id:
  62. type: string
  63. user:
  64. type: object
  65. properties: { id: { type: string }, nickName: { type: string }, userName: { type: string }, realName: { type: string }, sn: { type: integer }, avatar: { type: string }, roles: { type: array, items: { type: string } } }
  66. nullable: true
  67. earned_balance:
  68. type: integer
  69. earned_total:
  70. type: integer
  71. adjusted_total:
  72. type: integer
  73. spent_total:
  74. type: integer
  75. free_used_today:
  76. type: integer
  77. daily_free:
  78. type: integer
  79. last_activity_at:
  80. type: string
  81. nullable: true
  82. meta:
  83. $ref: '../../main.yaml#/components/schemas/PaginationMeta'
  84. 401:
  85. $ref: '../../main.yaml#/components/responses/ProblemUnauthorized'
  86. 422:
  87. $ref: '../../main.yaml#/components/responses/ProblemValidation'