refactor: 统一状态名称映射为公共函数,清理废弃换卡/商户类型常量和模型
This commit is contained in:
@@ -231,25 +231,10 @@ const (
|
||||
WithdrawalMethodBank = "bank" // 银行卡
|
||||
)
|
||||
|
||||
// 商户类型([预留] 用于未来商户管理功能,待产品规划)
|
||||
const (
|
||||
MerchantTypeAlipay = "alipay" // 支付宝([预留])
|
||||
MerchantTypeWechat = "wechat" // 微信([预留])
|
||||
MerchantTypeBank = "bank" // 银行卡([预留])
|
||||
)
|
||||
|
||||
// ========================================
|
||||
// 5. 系统管理常量
|
||||
// ========================================
|
||||
|
||||
// 换卡申请状态([预留] 用于换卡申请功能,待产品规划)
|
||||
const (
|
||||
ReplacementStatusPending = 1 // 待处理([预留])
|
||||
ReplacementStatusApproved = 2 // 已通过([预留])
|
||||
ReplacementStatusRejected = 3 // 已拒绝([预留])
|
||||
ReplacementStatusCompleted = 4 // 已完成([预留])
|
||||
)
|
||||
|
||||
// ========================================
|
||||
// 运营商编码
|
||||
// ========================================
|
||||
@@ -261,15 +246,6 @@ const (
|
||||
CarrierCodeCBN = "CBN" // 广电
|
||||
)
|
||||
|
||||
// 换货原因([预留] 用于换卡原因管理功能,待产品规划)
|
||||
const (
|
||||
ReplacementReasonDamaged = "damaged" // 损坏([预留])
|
||||
ReplacementReasonLost = "lost" // 丢失([预留])
|
||||
ReplacementReasonMalfunction = "malfunction" // 故障([预留])
|
||||
ReplacementReasonUpgrade = "upgrade" // 升级([预留])
|
||||
ReplacementReasonOther = "other" // 其他([预留])
|
||||
)
|
||||
|
||||
// ========================================
|
||||
// 状态名称映射函数
|
||||
// ========================================
|
||||
@@ -412,16 +388,3 @@ func GetWithdrawalStatusName(status int) string {
|
||||
return "未知"
|
||||
}
|
||||
}
|
||||
|
||||
// GetEnterpriseCardAuthStatusName 获取企业卡授权状态名称
|
||||
// 对应 EnterpriseCardAuthStatus* 常量:0=已回收, 1=有效
|
||||
func GetEnterpriseCardAuthStatusName(status int) string {
|
||||
switch status {
|
||||
case EnterpriseCardAuthStatusRevoked:
|
||||
return "已回收"
|
||||
case EnterpriseCardAuthStatusValid:
|
||||
return "有效"
|
||||
default:
|
||||
return "未知"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user