feat: integrate unified payment and wallet refunds

This commit is contained in:
2026-08-02 23:24:32 +08:00
parent f0b8af0bc8
commit 82a2106a97
64 changed files with 1519 additions and 254 deletions

View File

@@ -12,6 +12,7 @@ import (
"git.apinb.com/heqiapp/platforms/backend/api/internal/logic/platform/fin"
"git.apinb.com/heqiapp/platforms/backend/api/internal/logic/platform/gas"
"git.apinb.com/heqiapp/platforms/backend/api/internal/logic/platform/gasorder"
paymentlogic "git.apinb.com/heqiapp/platforms/backend/api/internal/logic/platform/payment"
platformlogic "git.apinb.com/heqiapp/platforms/backend/api/internal/logic/platform/platform"
"git.apinb.com/heqiapp/platforms/backend/api/internal/logic/platform/product"
"git.apinb.com/heqiapp/platforms/backend/api/internal/logic/platform/staff"
@@ -148,18 +149,14 @@ func registerWalletRoute(group *gin.RouterGroup) {
bank.GET("", wallet.ListWalletBank)
bank.GET("/:identity", wallet.GetWalletBank)
payment := group.Group("/wallet_payment")
payment.GET("", wallet.ListWalletPayment)
payment.GET("/:identity", wallet.GetWalletPayment)
payment := group.Group("/payment_order")
payment.GET("", wallet.ListPaymentOrder)
payment.GET("/:identity", wallet.GetPaymentOrder)
record := group.Group("/wallet_record")
record.GET("", wallet.ListWalletRecord)
record.GET("/:identity", wallet.GetWalletRecord)
refund := group.Group("/wallet_refund")
refund.GET("", wallet.ListWalletRefund)
refund.GET("/:identity", wallet.GetWalletRefund)
applyCash := group.Group("/wallet_apply_cash")
applyCash.GET("", wallet.ListWalletApplyCash)
applyCash.GET("/:identity", wallet.GetWalletApplyCash)
@@ -213,6 +210,11 @@ func registerPlatformRoute(group *gin.RouterGroup) {
}
func registerFinanceRoute(group *gin.RouterGroup) {
refund := group.Group("/payment_refund")
refund.GET("", paymentlogic.ListRefund)
refund.GET("/:identity", paymentlogic.GetRefund)
refund.POST("/:identity/approve", paymentlogic.ApproveRefund)
refund.POST("/:identity/reject", paymentlogic.RejectRefund)
registerReadOnlyResource(group, "/fin_payment", &models.FinPayment{})
settlementList, settlementCreate, settlementGet, settlementUpdate := fin.FinSettlementHandlers()
registerWritableResource(group, "/fin_settlement", settlementList, settlementCreate, settlementGet, settlementUpdate, &models.FinSettlement{})