feat: 实现代理钱包订单创建和订单角色追踪功能
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m0s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m0s
新增功能: - 代理在后台使用 wallet 支付时,订单直接完成(扣款 + 激活套餐) - 支持代理自购和代理代购场景 - 新增订单角色追踪字段(operator_id、operator_type、actual_paid_amount、purchase_role) - 订单查询支持 OR 逻辑(buyer_id 或 operator_id) - 钱包流水记录交易子类型和关联店铺 - 佣金逻辑调整:代理代购不产生佣金 数据库变更: - 订单表新增 4 个字段和 2 个索引 - 钱包流水表新增 2 个字段 - 包含迁移脚本和回滚脚本 文档: - 功能总结文档 - 部署指南 - OpenAPI 文档更新 - Specs 同步(新增 agent-order-role-tracking capability) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,6 +30,12 @@ const (
|
||||
AgentTransactionTypeWithdrawal = "withdrawal" // 提现
|
||||
)
|
||||
|
||||
// 代理钱包交易子类型(当 transaction_type = "deduct" 用于订单支付时)
|
||||
const (
|
||||
WalletTransactionSubtypeSelfPurchase = "self_purchase" // 自购
|
||||
WalletTransactionSubtypePurchaseForSubordinate = "purchase_for_subordinate" // 给下级代理购买
|
||||
)
|
||||
|
||||
// 代理充值订单号前缀
|
||||
const (
|
||||
AgentRechargeOrderPrefix = "ARCH" // 代理充值订单号前缀
|
||||
|
||||
Reference in New Issue
Block a user