重构交易处理逻辑,合并充值与购买流程,优化交易状态管理;更新相关数据结构和接口

This commit is contained in:
2025-06-26 09:28:42 +08:00
parent 065a7c77c3
commit 7d0bd84649
18 changed files with 843 additions and 919 deletions

View File

@@ -24,8 +24,6 @@ func ApplyRouters(app *fiber.App) {
user.Post("/update/password", handlers.UpdatePassword)
user.Post("/identify", handlers.Identify)
user.Post("/identify/callback", handlers.IdentifyCallback)
user.Post("/recharge/prepare", handlers.RechargePrepare)
user.Post("/recharge/complete", handlers.RechargeComplete)
// 白名单
whitelist := api.Group("/whitelist")
@@ -42,8 +40,6 @@ func ApplyRouters(app *fiber.App) {
resource.Post("/statistics/free", handlers.StatisticResourceFree)
resource.Post("/statistics/usage", handlers.StatisticResourceUsage)
resource.Post("/create", handlers.CreateResource)
resource.Post("/create/prepare", handlers.PrepareCreateResource)
resource.Post("/create/complete", handlers.CompleteCreateResource)
resource.Post("/price", handlers.ResourcePrice)
// 通道
@@ -55,8 +51,8 @@ func ApplyRouters(app *fiber.App) {
// 交易
trade := api.Group("/trade")
trade.Post("/callback/alipay", handlers.AlipayCallback)
trade.Post("/callback/wechat", handlers.WechatPayCallback)
trade.Post("/create", handlers.TradeCreate)
trade.Post("/complete", handlers.TradeComplete)
trade.Post("/check", handlers.TradeCheckSSE)
// 账单