C-06: DBSettlementStore.GetWithdrawableBalance 使用AccountRepository真实查询余额 C-05: DBEarningStore 使用新建的UsageRepository实现ListRecords/GetBillingSummary C-04: 供应商ID从cfg.Server.DefaultSupplierID配置读取 C-07: PDF链接从cfg.Server.StatementBaseURL配置读取 新增: - internal/repository/usage.go: 用量记录仓储
- 添加 ErrNotFound 和 ErrConcurrencyConflict 错误定义 - 修复 pgx.NullTime 替换为 *time.Time - 修复 db.go 事务类型 (pgx.Tx vs pgxpool.Tx) - 移除未使用的导入和变量 - 修复 NewSupplyAPI 调用参数 - 修复中间件链路 handler 类型问题 - 修复适配器类型引用 (storage.InMemoryAccountStore 等) - 所有测试通过 Test: go test ./...