feat: 补全 _name 字段公共映射函数,修正实名认证注释
This commit is contained in:
@@ -395,3 +395,33 @@ func GetRefundStatusName(status int) string {
|
||||
return "未知"
|
||||
}
|
||||
}
|
||||
|
||||
// GetWithdrawalStatusName 获取提现申请状态名称
|
||||
// 对应 WithdrawalStatus* 常量:1=待审核, 2=已通过, 3=已拒绝, 4=已到账
|
||||
func GetWithdrawalStatusName(status int) string {
|
||||
switch status {
|
||||
case WithdrawalStatusPending:
|
||||
return "待审核"
|
||||
case WithdrawalStatusApproved:
|
||||
return "已通过"
|
||||
case WithdrawalStatusRejected:
|
||||
return "已拒绝"
|
||||
case WithdrawalStatusPaid:
|
||||
return "已到账"
|
||||
default:
|
||||
return "未知"
|
||||
}
|
||||
}
|
||||
|
||||
// GetEnterpriseCardAuthStatusName 获取企业卡授权状态名称
|
||||
// 对应 EnterpriseCardAuthStatus* 常量:0=已回收, 1=有效
|
||||
func GetEnterpriseCardAuthStatusName(status int) string {
|
||||
switch status {
|
||||
case EnterpriseCardAuthStatusRevoked:
|
||||
return "已回收"
|
||||
case EnterpriseCardAuthStatusValid:
|
||||
return "有效"
|
||||
default:
|
||||
return "未知"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,6 +118,25 @@ const (
|
||||
|
||||
// ========== Redis Key 生成函数 ==========
|
||||
|
||||
// GetRechargeStatusName 获取充值状态名称
|
||||
// 对应 RechargeStatus* 常量:1=待支付, 2=已支付, 3=已完成, 4=已关闭, 5=已退款
|
||||
func GetRechargeStatusName(status int) string {
|
||||
switch status {
|
||||
case RechargeStatusPending:
|
||||
return "待支付"
|
||||
case RechargeStatusPaid:
|
||||
return "已支付"
|
||||
case RechargeStatusCompleted:
|
||||
return "已完成"
|
||||
case RechargeStatusClosed:
|
||||
return "已关闭"
|
||||
case RechargeStatusRefunded:
|
||||
return "已退款"
|
||||
default:
|
||||
return "未知"
|
||||
}
|
||||
}
|
||||
|
||||
// RedisAgentWalletBalanceKey 代理钱包余额缓存 Key
|
||||
// 格式:agent_wallet:balance:{shop_id}:{wallet_type}
|
||||
// TTL:300 秒(5 分钟)
|
||||
|
||||
Reference in New Issue
Block a user