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

@@ -1,4 +1,4 @@
package gas
package gas
import (
"strings"
@@ -45,14 +45,14 @@ func listWalletChild(ctx *gin.Context, model any, table string) {
}
func ListWalletBank(ctx *gin.Context) { listWalletChild(ctx, &models.WalletBank{}, "wallet_bank") }
func ListWalletPayment(ctx *gin.Context) {
listWalletChild(ctx, &models.WalletPayment{}, "wallet_payment")
func ListPaymentOrder(ctx *gin.Context) {
listWalletChild(ctx, &models.PaymentOrder{}, "payment_order")
}
func ListWalletRecord(ctx *gin.Context) {
listWalletChild(ctx, &models.WalletRecord{}, "wallet_record")
}
func ListWalletRefund(ctx *gin.Context) {
listWalletChild(ctx, &models.WalletRefund{}, "wallet_refund")
func ListPaymentRefund(ctx *gin.Context) {
listWalletChild(ctx, &models.PaymentRefund{}, "payment_refund")
}
func ListWalletApplyCash(ctx *gin.Context) {
listWalletChild(ctx, &models.WalletApplyCash{}, "wallet_apply_cash")

View File

@@ -1,4 +1,4 @@
package gas
package gas
import "git.apinb.com/heqiapp/platforms/backend/api/internal/logic/common"
@@ -35,9 +35,9 @@ var adminMenus = []Menu{
{Identity: "finance", GroupCode: "finance", Name: "财务管理", Icon: "icon-bar-chart", Path: "/finance", SortNo: 70, Status: common.StatusEnable},
{Identity: "wallet_basic", ParentIdentity: "finance", GroupCode: "finance", Name: "钱包", Path: "/finance/wallet", SortNo: 1, Status: common.StatusEnable},
{Identity: "wallet_bank", ParentIdentity: "finance", GroupCode: "finance", Name: "银行卡", Path: "/finance/banks", SortNo: 2, Status: common.StatusEnable},
{Identity: "wallet_payment", ParentIdentity: "finance", GroupCode: "finance", Name: "支付记录", Path: "/finance/payments", SortNo: 3, Status: common.StatusEnable},
{Identity: "payment_order", ParentIdentity: "finance", GroupCode: "finance", Name: "支付记录", Path: "/finance/payments", SortNo: 3, Status: common.StatusEnable},
{Identity: "wallet_record", ParentIdentity: "finance", GroupCode: "finance", Name: "钱包流水", Path: "/finance/records", SortNo: 4, Status: common.StatusEnable},
{Identity: "wallet_refund", ParentIdentity: "finance", GroupCode: "finance", Name: "退款记录", Path: "/finance/refunds", SortNo: 5, Status: common.StatusEnable},
{Identity: "payment_refund", ParentIdentity: "finance", GroupCode: "finance", Name: "退款记录", Path: "/finance/refunds", SortNo: 5, Status: common.StatusEnable},
{Identity: "wallet_apply_cash", ParentIdentity: "finance", GroupCode: "finance", Name: "提现申请", Path: "/finance/withdrawals", SortNo: 6, Status: common.StatusEnable},
{Identity: "fin_settlement", ParentIdentity: "finance", GroupCode: "finance", Name: "财务结算", Path: "/finance/settlements", SortNo: 7, Status: common.StatusEnable},
{Identity: "fin_reconciliation", ParentIdentity: "finance", GroupCode: "finance", Name: "财务对账", Path: "/finance/reconciliations", SortNo: 8, Status: common.StatusEnable},

View File

@@ -1,4 +1,4 @@
package gas
package gas
type ResourceMode string
@@ -30,8 +30,8 @@ func ExpectedResources() []ResourceContract {
{"contract", "gasorder_contract_revision", ReadOnly}, {"gasorder", "gasorder_basic", AppendOnly},
{"contract", "product_info", ReadOnly},
{"finance", "wallet_basic", ReadOnly}, {"finance", "wallet_bank", ReadOnly},
{"finance", "wallet_payment", ReadOnly}, {"finance", "wallet_record", ReadOnly},
{"finance", "wallet_refund", ReadOnly}, {"finance", "wallet_apply_cash", AppendOnly},
{"finance", "payment_order", ReadOnly}, {"finance", "wallet_record", ReadOnly},
{"finance", "payment_refund", ReadOnly}, {"finance", "wallet_apply_cash", AppendOnly},
{"finance", "fin_settlement", ReadOnly}, {"finance", "fin_reconciliation", ReadOnly},
{"ticket", "cs_ticket", Writable},
}