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

72 lines
2.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# GET /api/v1/feedback/records — 我的反馈历史
> 所属:Feedback 组(前缀 `/api/v1/feedback` | 鉴权:Bearer | [← 返回 API 索引](../README.md)
查询当前用户提交的反馈历史,支持按状态筛选。
## 入参(query
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| `status` | string \| null | ❌ | 筛选状态:`pending` / `adopted` / `rejected`;不传 = 全部 |
Mock 请求:
```
GET /api/v1/feedback/records?status=adopted
```
## 出参
响应 `200`:`FeedbackRecordsOut`
| 字段 | 类型 | 说明 |
|---|---|---|
| `records` | list[FeedbackRecordOut] | 反馈记录列表 |
| `records[].id` | int | 反馈 ID |
| `records[].content` | string | 反馈正文 |
| `records[].scene` | string \| null | 问题场景(比价结果页反馈时带,如 `找错商品` |
| `records[].images` | list[string] | 截图 URL 列表 |
| `records[].status` | string | `pending` / `adopted` / `rejected` |
| `records[].reject_reason` | string \| null | 驳回原因 |
| `records[].reward_coins` | int \| null | 采纳后发的金币数 |
| `records[].admin_reply` | string \| null | 管理员回复 |
| `records[].created_at` | datetime | 提交时间 |
| `counts` | object | 三态计数(不受 status 筛选影响) |
| `counts.all` | int | 总数 |
| `counts.pending` | int | 待处理 |
| `counts.adopted` | int | 已采纳 |
| `counts.rejected` | int | 已驳回 |
Mock 出参:
```json
{
"records": [
{
"id": 56,
"content": "比价结果显示美团 28.5 元,但实际下单时涨到了 32 元",
"scene": "价格不一致",
"images": ["/media/feedback/u42_f1e2d3c4b5a60708.jpg"],
"status": "adopted",
"reject_reason": null,
"reward_coins": 500,
"admin_reply": "感谢反馈,已核实并修复",
"created_at": "2026-07-02T15:20:00Z"
}
],
"counts": {
"all": 3,
"pending": 1,
"adopted": 2,
"rejected": 0
}
}
```
## 错误码
- `400` 无效的 `status` 值(仅 `pending`/`adopted`/`rejected` 合法)
- `401` 未鉴权
## 说明
- `counts` 始终基于全量(不受 `status` 筛选影响),供前端筛选 chip
- `scene` 仅比价结果页反馈时带(区分普通反馈 vs 比价场景反馈)