Files
kami_backend/.claude/commands/openspec/apply.md
danial bc2d58753b feat(jd_cookie):重构订单创建逻辑并优化相关模型
- 新增 CreateOrderReq 结构体用于统一订单创建参数- 修改 CreateOrder 方法签名,使用结构体传参替代多个参数
- 更新 jd_cookie 相关枚举值,增加 JdCookieStatusUnknown 状态
- 调整 OrderInfo 和 JdOrderInfo 模型字段,增强数据一致性
-优化订单与京东订单关联逻辑,移除冗余的 CurrentOrderId 字段
- 移除 ShouldExtractCard 方法,改为内部私有方法 shouldExtractCard- 精简 Callback 方法参数,移除不必要的 userOrderId 和 amount 参数
- 修复订单历史记录中订单号关联问题,直接使用 orderId 字段查询
- 更新控制器层参数传递方式,适配新的服务层接口定义
- 调整卡密提取逻辑,去除对用户订单实体的依赖
- 完善订单状态检查机制,提高卡密提取安全性
- 优化数据库查询逻辑,减少不必要的关联查询操作
2025-10-18 14:13:40 +08:00

1.3 KiB

name: OpenSpec: Apply description: Implement an approved OpenSpec change and keep tasks in sync. category: OpenSpec tags: [openspec, apply]

Guardrails

  • Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
  • Keep changes tightly scoped to the requested outcome.
  • Refer to openspec/AGENTS.md (located inside the openspec/ directory—run ls openspec or openspec update if you don't see it) if you need additional OpenSpec conventions or clarifications.

Steps Track these steps as TODOs and complete them one by one.

  1. Read changes/<id>/proposal.md, design.md (if present), and tasks.md to confirm scope and acceptance criteria.
  2. Work through tasks sequentially, keeping edits minimal and focused on the requested change.
  3. Confirm completion before updating statuses—make sure every item in tasks.md is finished.
  4. Update the checklist after all work is done so each task is marked - [x] and reflects reality.
  5. Reference openspec list or openspec show <item> when additional context is required.

Reference

  • Use openspec show <id> --json --deltas-only if you need additional context from the proposal while implementing.