feat(通道流量阈值): AUG26-011 运营商通道流量阈值达量停机与周期复机
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 12m59s

This commit is contained in:
2026-09-16 15:54:49 +08:00
parent 41722760b1
commit 59b3df868a
36 changed files with 2431 additions and 93 deletions

View File

@@ -5,6 +5,7 @@ import (
agentrechargeApp "github.com/break/junhong_cmp_fiber/internal/application/agentrecharge"
cardObservationApp "github.com/break/junhong_cmp_fiber/internal/application/cardobservation"
carrierthresholdApp "github.com/break/junhong_cmp_fiber/internal/application/carrierthreshold"
"github.com/break/junhong_cmp_fiber/internal/service/commission_calculation"
"github.com/break/junhong_cmp_fiber/internal/service/commission_stats"
packagepkg "github.com/break/junhong_cmp_fiber/internal/service/package"
@@ -60,19 +61,22 @@ type WorkerStores struct {
// WorkerServices Worker 侧所有 Service 的集合
type WorkerServices struct {
PaymentAudit agentrechargeApp.PaymentAuditWriter
RechargeAudit agentrechargeApp.RechargeAuditWriter
CardObservation *cardObservationApp.Service
CardObservationSeries *cardObservationApp.SeriesAttemptService
ObservationSeriesEvents cardObservationApp.SeriesEventWriter
CommissionCalculation *commission_calculation.Service
CommissionStats *commission_stats.Service
UsageService *packagepkg.UsageService
ActivationService *packagepkg.ActivationService
ResetService *packagepkg.ResetService
AlertService *pollingSvc.AlertService
CleanupService *pollingSvc.CleanupService
StopResumeService packagepkg.StopResumeCallback // 停复机服务,用于注入 Scheduler
PaymentAudit agentrechargeApp.PaymentAuditWriter
RechargeAudit agentrechargeApp.RechargeAuditWriter
CardObservation *cardObservationApp.Service
CardObservationSeries *cardObservationApp.SeriesAttemptService
ObservationSeriesEvents cardObservationApp.SeriesEventWriter
CommissionCalculation *commission_calculation.Service
CommissionStats *commission_stats.Service
UsageService *packagepkg.UsageService
ActivationService *packagepkg.ActivationService
ResetService *packagepkg.ResetService
AlertService *pollingSvc.AlertService
CleanupService *pollingSvc.CleanupService
StopResumeService packagepkg.StopResumeCallback // 停复机服务,用于注入 Scheduler
// CarrierThreshold 是运营商通道流量阈值的唯一用例实例:达量判定、持锁拒绝、停复机消费者与
// 两个计划任务共用它,使直接执行的成功与恢复确认的成功走同一回写路径。
CarrierThreshold *carrierthresholdApp.Service
OrderExpirer OrderExpirer // 订单超时取消服务(接口类型,避免循环依赖)
AssetPackageOrderCreator task.AssetPackageBatchOrderCreator // 批量订购复用后台单笔订单规则
DeviceBatchAllocator task.DeviceBatchAllocationExecutor // 设备CSV批量分配复用现有业务规则