All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m6s
29 lines
775 B
Go
29 lines
775 B
Go
package constants
|
|
|
|
const (
|
|
// PaymentRecordStatusPending 表示支付单待支付。
|
|
PaymentRecordStatusPending = 0
|
|
// PaymentRecordStatusPaid 表示支付单已支付。
|
|
PaymentRecordStatusPaid = 1
|
|
// PaymentRecordStatusFailed 表示支付单已失败。
|
|
PaymentRecordStatusFailed = 2
|
|
// PaymentRecordStatusRefunded 表示支付单已退款。
|
|
PaymentRecordStatusRefunded = 3
|
|
)
|
|
|
|
// GetPaymentRecordStatusName 返回支付单状态中文名称。
|
|
func GetPaymentRecordStatusName(status int) string {
|
|
switch status {
|
|
case PaymentRecordStatusPending:
|
|
return "待支付"
|
|
case PaymentRecordStatusPaid:
|
|
return "已支付"
|
|
case PaymentRecordStatusFailed:
|
|
return "已失败"
|
|
case PaymentRecordStatusRefunded:
|
|
return "已退款"
|
|
default:
|
|
return "未知"
|
|
}
|
|
}
|