七月迭代短暂完结,还有很多后端的关键东西没有弄,这是一版赶时间做的东西
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m26s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m26s
This commit is contained in:
71
pkg/constants/wallet_export.go
Normal file
71
pkg/constants/wallet_export.go
Normal file
@@ -0,0 +1,71 @@
|
||||
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 "未知"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user