feat: 实现平台抽成、提现审批、异步任务集成及安全审计功能

This commit is contained in:
2025-12-30 14:54:19 +08:00
parent 5e8dbec806
commit ee1acae3ed
25 changed files with 985 additions and 60 deletions

View File

@@ -1688,6 +1688,8 @@ const (
OrderTypeContentPurchase OrderType = "content_purchase"
// OrderTypeRecharge is a OrderType of type recharge.
OrderTypeRecharge OrderType = "recharge"
// OrderTypeWithdrawal is a OrderType of type withdrawal.
OrderTypeWithdrawal OrderType = "withdrawal"
)
var ErrInvalidOrderType = fmt.Errorf("not a valid OrderType, try [%s]", strings.Join(_OrderTypeNames, ", "))
@@ -1695,6 +1697,7 @@ var ErrInvalidOrderType = fmt.Errorf("not a valid OrderType, try [%s]", strings.
var _OrderTypeNames = []string{
string(OrderTypeContentPurchase),
string(OrderTypeRecharge),
string(OrderTypeWithdrawal),
}
// OrderTypeNames returns a list of possible string values of OrderType.
@@ -1709,6 +1712,7 @@ func OrderTypeValues() []OrderType {
return []OrderType{
OrderTypeContentPurchase,
OrderTypeRecharge,
OrderTypeWithdrawal,
}
}
@@ -1727,6 +1731,7 @@ func (x OrderType) IsValid() bool {
var _OrderTypeValue = map[string]OrderType{
"content_purchase": OrderTypeContentPurchase,
"recharge": OrderTypeRecharge,
"withdrawal": OrderTypeWithdrawal,
}
// ParseOrderType attempts to convert a string to a OrderType.
@@ -2008,6 +2013,8 @@ const (
TenantLedgerTypeDebitPurchase TenantLedgerType = "debit_purchase"
// TenantLedgerTypeCreditRefund is a TenantLedgerType of type credit_refund.
TenantLedgerTypeCreditRefund TenantLedgerType = "credit_refund"
// TenantLedgerTypeCreditWithdrawal is a TenantLedgerType of type credit_withdrawal.
TenantLedgerTypeCreditWithdrawal TenantLedgerType = "credit_withdrawal"
// TenantLedgerTypeFreeze is a TenantLedgerType of type freeze.
TenantLedgerTypeFreeze TenantLedgerType = "freeze"
// TenantLedgerTypeUnfreeze is a TenantLedgerType of type unfreeze.
@@ -2021,6 +2028,7 @@ var ErrInvalidTenantLedgerType = fmt.Errorf("not a valid TenantLedgerType, try [
var _TenantLedgerTypeNames = []string{
string(TenantLedgerTypeDebitPurchase),
string(TenantLedgerTypeCreditRefund),
string(TenantLedgerTypeCreditWithdrawal),
string(TenantLedgerTypeFreeze),
string(TenantLedgerTypeUnfreeze),
string(TenantLedgerTypeAdjustment),
@@ -2038,6 +2046,7 @@ func TenantLedgerTypeValues() []TenantLedgerType {
return []TenantLedgerType{
TenantLedgerTypeDebitPurchase,
TenantLedgerTypeCreditRefund,
TenantLedgerTypeCreditWithdrawal,
TenantLedgerTypeFreeze,
TenantLedgerTypeUnfreeze,
TenantLedgerTypeAdjustment,
@@ -2057,11 +2066,12 @@ func (x TenantLedgerType) IsValid() bool {
}
var _TenantLedgerTypeValue = map[string]TenantLedgerType{
"debit_purchase": TenantLedgerTypeDebitPurchase,
"credit_refund": TenantLedgerTypeCreditRefund,
"freeze": TenantLedgerTypeFreeze,
"unfreeze": TenantLedgerTypeUnfreeze,
"adjustment": TenantLedgerTypeAdjustment,
"debit_purchase": TenantLedgerTypeDebitPurchase,
"credit_refund": TenantLedgerTypeCreditRefund,
"credit_withdrawal": TenantLedgerTypeCreditWithdrawal,
"freeze": TenantLedgerTypeFreeze,
"unfreeze": TenantLedgerTypeUnfreeze,
"adjustment": TenantLedgerTypeAdjustment,
}
// ParseTenantLedgerType attempts to convert a string to a TenantLedgerType.