Files
junhong_cmp_fiber/pkg/constants/wallet_export.go
break 73f5125d3d
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m26s
七月迭代短暂完结,还有很多后端的关键东西没有弄,这是一版赶时间做的东西
2026-07-25 17:06:58 +08:00

72 lines
1.7 KiB
Go

package constants
// GetAgentTransactionTypeName 返回代理钱包交易类型中文名称。
func GetAgentTransactionTypeName(transactionType string) string {
switch transactionType {
case AgentTransactionTypeRecharge:
return "充值"
case AgentTransactionTypeDeduct:
return "扣款"
case AgentTransactionTypeRefund:
return "退款"
case AgentTransactionTypeCommission:
return "分佣"
case AgentTransactionTypeWithdrawal:
return "提现"
case AgentTransactionTypeCommissionDeduct:
return "退款佣金回扣"
case AgentTransactionTypeAdjustment:
return "人工余额调整"
default:
return "未知"
}
}
// GetTransactionStatusName 返回钱包交易状态中文名称。
func GetTransactionStatusName(status int) string {
switch status {
case TransactionStatusSuccess:
return "成功"
case TransactionStatusFailed:
return "失败"
case TransactionStatusProcessing:
return "处理中"
default:
return "未知"
}
}
// GetWalletAssetTypeName 返回钱包流水资产类型中文名称。
func GetWalletAssetTypeName(assetType string) string {
switch assetType {
case AssetTypeIotCard:
return "物联网卡"
case AssetTypeDevice:
return "设备"
case "":
return ""
default:
return "未知"
}
}
// GetBusinessPaymentMethodName 返回业务支付方式中文名称。
func GetBusinessPaymentMethodName(method string) string {
switch method {
case PaymentMethodWallet:
return "钱包支付"
case RechargeMethodWechat:
return "微信支付"
case RechargeMethodAlipay:
return "支付宝支付"
case RechargeMethodBank:
return "银行转账"
case RechargeMethodOffline:
return "线下支付"
case "":
return ""
default:
return "未知"
}
}