This commit is contained in:
zhengchiliu
2026-09-15 00:53:04 +08:00
parent 32a0b87e9e
commit 112c5f8e46
42 changed files with 1121 additions and 304 deletions
+18 -16
View File
@@ -36,12 +36,12 @@ const (
QuotaChangeTargetUse int8 = 2 // 使用
// ChangeType 变更类型
QuotaChangeTypePurchase int8 = 1 // 购买获赠
QuotaChangeTypeActivity int8 = 2 // 活动赠送
QuotaChangeTypeConsume int8 = 3 // 上传消耗
QuotaChangeTypeRefund int8 = 4 // 删除回退
QuotaChangeTypeManual int8 = 5 // 人工调整
QuotaChangeTypeRefundRevoke int8 = 6 // 退款回收
QuotaChangeTypePurchase int8 = 1 // 购买获赠
QuotaChangeTypeActivity int8 = 2 // 活动赠送
QuotaChangeTypeConsume int8 = 3 // 上传消耗
QuotaChangeTypeRefund int8 = 4 // 删除回退
QuotaChangeTypeManual int8 = 5 // 人工调整
QuotaChangeTypeRefundRevoke int8 = 6 // 退款回收
)
// 新用户默认免费额度(内置兜底值)。
@@ -154,10 +154,10 @@ const (
PayChannelVirtual int8 = 2 // 微信虚拟支付(XPay)
// 虚拟支付平台(由前端按 systemInfo.platform 上报)
XPayPlatformAndroid = "android"
XPayPlatformIOS = "ios"
XPayPlatformHarmony = "harmony"
XPayPlatformWindows = "windows"
XPayPlatformAndroid = "android"
XPayPlatformIOS = "ios"
XPayPlatformHarmony = "harmony"
XPayPlatformWindows = "windows"
)
// ===== 退款 Refund =====
@@ -170,12 +170,12 @@ const (
// ===== VIP 流水 =====
const (
VIPChangeTypeOpen int8 = 1 // 开通
VIPChangeTypeRenew int8 = 2 // 续费
VIPChangeTypeActivity int8 = 3 // 活动赠送
VIPChangeTypeExpire int8 = 4 // 到期失效
VIPChangeTypeManual int8 = 5 // 人工调整
VIPChangeTypeRefundRevoke int8 = 6 // 退款回收
VIPChangeTypeOpen int8 = 1 // 开通
VIPChangeTypeRenew int8 = 2 // 续费
VIPChangeTypeActivity int8 = 3 // 活动赠送
VIPChangeTypeExpire int8 = 4 // 到期失效
VIPChangeTypeManual int8 = 5 // 人工调整
VIPChangeTypeRefundRevoke int8 = 6 // 退款回收
VIPSourcePersonalPay int8 = 1 // 个人支付
VIPSourceActivity int8 = 2 // 活动赠送
@@ -204,10 +204,12 @@ const (
BenefitTaskSuccess int8 = 1 // 已发放
BenefitTaskFailed int8 = 2 // 发放失败(重试超限)
BenefitTaskProcessing int8 = 3 // 发放中(认领后,防并发重复发放)
BenefitTaskCancelled int8 = 4 // 订单已退款,禁止继续发放
benefitMaxRetry int = 3 // 默认最大重试次数
// benefitRetryCooldownSeconds 失败任务被回调重新触发的冷却期(秒):
// 冷却期内不重置,防止微信回调重试风暴无限重置任务绕过重试上限。
benefitRetryCooldownSeconds int64 = 300
benefitRevokeMaxRetry = 10
)