This commit is contained in:
30
openspec/changes/add-polling-priority-queue/tasks.md
Normal file
30
openspec/changes/add-polling-priority-queue/tasks.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# Tasks: 轮询管理 - 优先队列
|
||||
|
||||
## 1. 类型
|
||||
- [ ] 1.1 新增 `src/types/api/pollingPriorityQueue.ts`:优先轮询项 `PollingPriorityItem`(`id` / `card_id` / `iccid` / `task_type` / `task_type_name` / `status` / `status_name` / `trigger_type` / `trigger_type_name` / `trigger_types` / `trigger_count` / `attempt_count` / `result` / `result_name` / `failure_reason` / `shop_id_snapshot` / `source_order_id` / `source_package_usage_id` / `manual_operator_id` / `manual_operator_name` / `manual_reason` / `claimed_at` / `last_triggered_at` / `created_at` / `updated_at`)
|
||||
- [ ] 1.2 查询参数、分页响应 `PollingPriorityItemPageResult`、人工入队请求/响应、入队项 `PriorityItemResult` 类型
|
||||
- [ ] 1.3 `src/types/api/index.ts` 导出新类型
|
||||
|
||||
## 2. API
|
||||
- [ ] 2.1 新增 `src/api/modules/pollingPriorityQueue.ts`:
|
||||
- `getPriorityItems`:`GET /api/admin/polling-priority-items`,分页查询卡轮询优先项,按创建时间倒序,支持卡 `card_id`、任务类型 `task_type`、状态 `status`、触发类型 `trigger_type` 筛选
|
||||
- `createPriorityItems`:`POST /api/admin/polling-priority-items`,人工优先入队,请求 `{ card_id, reason }`
|
||||
- `getPriorityItemDetail`:`GET /api/admin/polling-priority-items/{id}`,查询单项详情
|
||||
- [ ] 2.2 `src/api/modules/index.ts` 导出新服务
|
||||
|
||||
## 3. 页面
|
||||
- [ ] 3.1 `src/router/routesAlias.ts` 新增优先队列路由别名,`src/router/routes/asyncRoutes.ts` 在轮询管理下注册路由与菜单
|
||||
- [ ] 3.2 新增 `src/views/polling-management/priority-queue/index.vue`:筛选(卡/任务类型/状态/触发类型)、分页、表格展示列表项字段
|
||||
- [ ] 3.3 实现任务类型、状态、触发类型、执行结果枚举映射与中文展示
|
||||
- [ ] 3.4 实现人工优先入队弹窗:选择卡、原因必填校验(最长 500 字符),提交后展示 created_count / merged_count / items
|
||||
- [ ] 3.5 实现单项详情查看(页面或抽屉),越权与不存在按同一错误处理
|
||||
|
||||
## 4. 常量与文案
|
||||
- [ ] 4.1 在 `src/config/constants/augustIteration.ts`(或新增常量文件)登记任务类型/状态/触发类型/结果枚举与中文名称
|
||||
- [ ] 4.2 `src/locales/langs/zh.json`、`src/locales/langs/en.json` 补充菜单与页面文案
|
||||
|
||||
## 5. Verification
|
||||
- [ ] 5.1 验证筛选与分页参数正确传递、列表按创建时间倒序
|
||||
- [ ] 5.2 验证人工入队成功/合并/原因校验(空与超长)
|
||||
- [ ] 5.3 验证详情接口与越权/不存在不区分
|
||||
- [ ] 5.4 运行 lint、类型检查与构建
|
||||
Reference in New Issue
Block a user