v3-admin-credit-settlements.yaml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-admin-credit-settlements.yaml
  2. post:
  3. summary: 手工结算积分
  4. tags:
  5. - admin
  6. operationId: post_api_v3_admin_credit_settlements
  7. description: |-
  8. 把登录用户的读经、编辑时长结算成积分。可重复执行:同一用户同一天的积分是覆盖不是累加,不会重复入账。
  9. 不给 `date`:从积分上线日到昨天,补齐所有漏结算的「用户 + 日」(与每日任务相同);
  10. 给 `date`:按当前策略重算那一天的所有用户。同步执行。
  11. 实现:`V3\AdminCreditSettlementController@store`
  12. security:
  13. -
  14. bearerAuth: []
  15. requestBody:
  16. required: false
  17. content:
  18. application/json:
  19. schema:
  20. type: object
  21. properties:
  22. date:
  23. type: string
  24. description: 只重算这一天(UTC,Y-m-d),不早于积分上线日、不晚于今天
  25. responses:
  26. 200:
  27. description: 成功
  28. content:
  29. application/json:
  30. schema:
  31. type: object
  32. properties:
  33. data:
  34. type: object
  35. properties:
  36. mode:
  37. type: string
  38. enum:
  39. - day
  40. - missing
  41. from:
  42. type: string
  43. to:
  44. type: string
  45. users:
  46. type: integer
  47. pairs:
  48. type: integer
  49. nullable: true
  50. trigger:
  51. type: string
  52. enum:
  53. - cli
  54. - admin
  55. operator:
  56. type: string
  57. nullable: true
  58. ran_at:
  59. type: string
  60. seconds:
  61. type: number
  62. 201:
  63. description: '结算完成。响应体与 200 同形'
  64. content:
  65. application/json:
  66. schema:
  67. type: object
  68. properties:
  69. data:
  70. type: object
  71. properties:
  72. mode:
  73. type: string
  74. enum:
  75. - day
  76. - missing
  77. from:
  78. type: string
  79. to:
  80. type: string
  81. users:
  82. type: integer
  83. pairs:
  84. type: integer
  85. nullable: true
  86. trigger:
  87. type: string
  88. enum:
  89. - cli
  90. - admin
  91. operator:
  92. type: string
  93. nullable: true
  94. ran_at:
  95. type: string
  96. seconds:
  97. type: number
  98. 401:
  99. $ref: '../../main.yaml#/components/responses/ProblemUnauthorized'
  100. 422:
  101. $ref: '../../main.yaml#/components/responses/ProblemValidation'