修复设备套餐流量不同步的问题
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m32s

This commit is contained in:
2026-04-22 18:04:53 +08:00
parent 6eb6d381f7
commit a207c51bfb
8 changed files with 182 additions and 42 deletions

View File

@@ -408,6 +408,13 @@ func RedisCardDailyTrafficKey(cardID uint, date string) string {
return fmt.Sprintf("traffic:daily:%d:%s", cardID, date)
}
// RedisPackageUsageRemainderKey 生成套餐扣减流量小数余量缓存键
// 用途:缓存载体维度的 <1MB 小数余量,累计后再触发整数 MB 扣减
// 过期时间7 天
func RedisPackageUsageRemainderKey(carrierType string, carrierID uint) string {
return fmt.Sprintf("package:usage:remainder:%s:%d", carrierType, carrierID)
}
// ========================================
// 轮询分片队列相关 Redis Key
// ========================================