Files
junhong_cmp_fiber/openspec/changes/fix-package-usage-paid-amount-cost-snapshot/tasks.md
break cbadf77517
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m28s
修复价格不一致的问题
2026-08-13 17:43:14 +08:00

18 lines
1.2 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.
## 1. 修正套餐使用记录成本价快照来源
- [x] 1.1 `internal/service/order/service.go``activateMainPackage``PaidAmount: order.ActualPaidAmount` 改为 `PaidAmount: &order.SellerCostPrice`
- [x] 1.2 `internal/service/order/service.go``activateAddonPackage``PaidAmount: order.ActualPaidAmount` 改为 `PaidAmount: &order.SellerCostPrice`
- [x] 1.3 `internal/task/auto_purchase.go` 中自动购包主套餐的 `PaidAmount: order.ActualPaidAmount` 改为 `PaidAmount: &order.SellerCostPrice`
- [x] 1.4 `internal/task/auto_purchase.go` 中自动购包加油包的 `PaidAmount: order.ActualPaidAmount` 改为 `PaidAmount: &order.SellerCostPrice`
## 2. 同步字段注释
- [x] 2.1 `internal/model/package.go``PackageUsage.PaidAmount` 的 gorm 注释由「从订单 actual_paid_amount 复制」改为「购买成本价快照(分,从订单 seller_cost_price 复制,无订单或线下支付时为 null
## 3. 验证
- [x] 3.1 `gofmt -w` 修改过的 Go 文件
- [x] 3.2 `go build ./cmd/api ./cmd/worker` 通过
- [x] 3.3 `openspec validate --all` 通过
- [x] 3.4 人工验证:个人客户为设备购买套餐后,平台账号查询资产套餐列表时 `paid_amount` 等于店铺成本价、`retail_amount` 等于零售价