Files
junhong_cmp_fiber/openspec/changes/archive/2026-03-19-client-exchange-system/tasks.md
huang b9733c4913
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m12s
fix: 修正零售价架构错误 + 清理旧微信配置 + 归档提案 + 前端接口文档
1. 修正 retail_price 架构:
   - 删除 batch-pricing 接口的 pricing_target 字段和 retail_price 分支
     (上级只能改下级成本价,不能改零售价)
   - 新增 PATCH /api/admin/packages/:id/retail-price 接口
     (代理自己改自己的零售价,校验 retail_price >= cost_price)

2. 清理旧微信 YAML 配置(已全部迁移到数据库 tb_wechat_config):
   - 删除 config.yaml 中 wechat.official_account 配置节
   - 删除 NewOfficialAccountApp() 旧工厂函数
   - 清理 personal_customer service 中的死代码(旧登录/绑定微信方法)
   - 清理 docker-compose.prod.yml 中旧微信环境变量和证书挂载注释

3. 归档四个已完成提案到 openspec/changes/archive/

4. 新增前端接口变更说明文档(docs/前端接口变更说明.md)

5. 修正归档提案和 specs 中关于 pricing_target 的错误描述
2026-03-19 17:39:43 +08:00

38 lines
2.3 KiB
Markdown
Raw 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.
- [x] 1.1 定义 ExchangeOrder 模型(含 BaseModel、旧/新资产字段、收货字段、物流字段、迁移字段、shop_id
- [x] 1.2 新增换货状态常量1待填写、2待发货、3已发货待确认、4已完成、5已取消
- [x] 1.3 实现换货单号生成函数EXC + 日期时间 + 随机数)
- [x] 1.4 新增后台/客户端换货相关 DTO请求参数、响应结构、错误字段
- [x] 2.1 创建数据库迁移:新增 tb_exchange_order 表
- [x] 2.2 创建数据库迁移:将 tb_card_replacement_record 改名为 tb_card_replacement_record_legacy
- [x] 3.1 实现 ExchangeOrderStore创建换货单、按ID查询、按条件分页查询
- [x] 3.2 实现 ExchangeOrderStore状态更新含前置状态校验
- [x] 3.3 实现 ExchangeOrderStore按旧资产查询进行中换货单
- [x] 4.1 实现换货 ServiceH1 创建换货单与重复进行中校验
- [x] 4.2 实现换货 Service状态流转校验1->2->3->4、1/2->5
- [x] 4.3 实现换货 ServiceH4 发货同类型资产校验与新资产在库校验
- [x] 4.4 实现换货 ServiceH5 确认完成与可选全量迁移入口
- [x] 4.5 实现换货 Service全量迁移事务11张表规则
- [x] 4.6 实现换货 ServiceH7 转新逻辑generation+1、状态重置、清除绑定、新钱包
- [x] 5.1 新增后台 Exchange HandlerH1~H7
- [x] 5.2 在 admin 路由注册 H1~H7使用 Register() + RouteSpec 完整元数据)
- [x] 6.1 新增客户端 Exchange HandlerG1~G2
- [x] 6.2 在客户端路由注册 G1~G2使用 Register() + RouteSpec 完整元数据)
- [x] 7.1 清理旧模型引用:移除/停用 card_replacement.go 在业务流程中的使用
- [x] 7.2 修改 iot_card_store.go 的 is_replaced 过滤逻辑,改为查询 ExchangeOrder
- [x] 8.1 更新 bootstrap/types.go新增后台与客户端换货 Handler 字段
- [x] 8.2 更新 bootstrap/handlers.go实例化换货相关 Handler
- [x] 8.3 更新 cmd/api/docs.go注册换货 Handler 到文档生成器
- [x] 8.4 更新 cmd/gendocs/main.go注册换货 Handler 到文档生成器
- [x] 9.1 执行 go build 验证编译通过
- [x] 9.2 执行 lsp_diagnostics 检查改动文件诊断信息
- [x] 9.3 使用数据库验证流程核对 tb_exchange_order 与 legacy 表结构
- [x] 9.4 在 docs/client-exchange-system/ 补充功能总结文档