feat: 分层轮询、重置日前加密与激活前流量结算
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m37s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m37s
- 轮询配置新增套餐状态、资产状态、重置日前窗口与窗口内流量间隔(迁移 248),间隔三态:正数按间隔、0 不检查、空继承 - 配置按 priority, id 排序合并;在库与已销售无套餐未匹配时告警不入队 - 新增优先级整体重排、匹配预览、立即重算到期时间(异步只提前)、分层统计与重置日前加密统计接口 - 已切换日快照计量的卡流量按观测时间归属,激活前用量只记已结算 - 订单购买与实名激活补齐资产级激活锁,激活前对已切换卡结算一次流量,失败只告警不阻塞,结算不触发通道阈值判定
This commit is contained in:
@@ -37,6 +37,62 @@ func registerPollingConfigRoutes(router fiber.Router, handler *admin.PollingConf
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(configs, doc, groupPath, "PUT", "/priorities", handler.UpdatePriorities, RouteSpec{
|
||||
Summary: "整体调整轮询配置优先级(仅超级管理员)",
|
||||
Tags: []string{"轮询配置管理"},
|
||||
Input: new(dto.UpdatePollingConfigPrioritiesRequest),
|
||||
Output: nil,
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(configs, doc, groupPath, "GET", "/match-preview", handler.MatchPreview, RouteSpec{
|
||||
Summary: "预览卡的轮询配置匹配结果(按当前配置)",
|
||||
Tags: []string{"轮询配置管理"},
|
||||
Input: new(dto.PollingConfigMatchPreviewRequest),
|
||||
Output: new(dto.PollingConfigMatchPreviewResponse),
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(configs, doc, groupPath, "POST", "/match-preview", handler.MatchPreview, RouteSpec{
|
||||
Summary: "预览卡的轮询配置匹配结果(可带未保存修改,不写数据)",
|
||||
Tags: []string{"轮询配置管理"},
|
||||
Input: new(dto.PollingConfigMatchPreviewRequest),
|
||||
Output: new(dto.PollingConfigMatchPreviewResponse),
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(configs, doc, groupPath, "POST", "/recalculate-due", handler.CreateRecalculateTask, RouteSpec{
|
||||
Summary: "立即重算轮询到期时间(异步,只提前不推后,仅超级管理员)",
|
||||
Tags: []string{"轮询配置管理"},
|
||||
Input: new(dto.PollingRecalculateDueRequest),
|
||||
Output: new(dto.PollingRecalculateDueResponse),
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(configs, doc, groupPath, "GET", "/recalculate-due/:task_id", handler.GetRecalculateTask, RouteSpec{
|
||||
Summary: "查询重算轮询到期时间任务进度",
|
||||
Tags: []string{"轮询配置管理"},
|
||||
Input: new(dto.PollingRecalculateDueTaskIDRequest),
|
||||
Output: new(dto.PollingRecalculateDueResponse),
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(router, doc, basePath, "GET", "/polling-stats/pre-reset", handler.PreResetStats, RouteSpec{
|
||||
Summary: "重置日前加密查流量效果统计",
|
||||
Tags: []string{"轮询配置管理"},
|
||||
Input: nil,
|
||||
Output: new(dto.PollingPreResetStatsResponse),
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(router, doc, basePath, "GET", "/polling-stats/tiers", handler.TierStats, RouteSpec{
|
||||
Summary: "分层轮询统计(结果缓存 5 分钟)",
|
||||
Tags: []string{"轮询配置管理"},
|
||||
Input: nil,
|
||||
Output: new(dto.PollingTierStatsResponse),
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(configs, doc, groupPath, "GET", "/:id", handler.Get, RouteSpec{
|
||||
Summary: "获取轮询配置详情",
|
||||
Tags: []string{"轮询配置管理"},
|
||||
|
||||
Reference in New Issue
Block a user