feat: 停复机新规则转正,删除总开关与旧口径
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m35s

- 删除总开关 stop_resume.unified_rule_enabled(配置、加载、部署工作流与 docker-compose.prod.yml 环境变量)
- 复机不看停机原因:删除只对轮询停因复机的旧分支与 ListByDeviceIDAndPollingStopReasons;设备复机取全部停机卡
- 实名门槛只按卡所属通道实名管控判断,删除行业卡与卡/设备实名策略放行;暂停轮询的卡不自动停复机无条件生效
- 通道阈值新周期解锁后的复机条件固定为新规则复机条件
- 资产自动续费复机同步新规则:不看停因、暂停轮询不复机、设备取全部停机卡、复机成功清除停因
- 实名轮询不再按行业卡跳过;所属运营商账户未开启实名管控时跳过查询,但卡未实名且所在资产有等待实名激活的套餐时照常查询,避免囤货套餐无法激活
This commit is contained in:
邹进
2026-10-25 18:13:51 +09:00
parent 457abaabd7
commit f49baff7c2
15 changed files with 155 additions and 159 deletions

View File

@@ -67,8 +67,19 @@ func (h *PollingRealnameHandler) Handle(ctx context.Context, task *asynq.Task) e
if !h.base.priorityInPollingScope(ctx, priority, card) {
return h.base.requeueCard(ctx, cardID, constants.TaskTypePollingRealname)
}
if card.CardCategory == constants.CardCategoryIndustry || h.gateway == nil {
priority.FailFinal(ctx, "卡类型不适用实名轮询或实名查询能力未配置")
if h.gateway == nil {
priority.FailFinal(ctx, "实名查询能力未配置")
return h.base.requeueCard(ctx, cardID, constants.TaskTypePollingRealname)
}
// 所属运营商账户未开启实名管控时实名结果不影响停复机,跳过查询并按正常间隔重入队(不再按行业卡跳过)。
skippable, scopeErr := h.base.realnameQuerySkippable(ctx, card)
if scopeErr != nil {
priority.FailRetryable(ctx, "查询运营商账户实名管控失败")
return h.failAndRequeue(ctx, cardID, startedAt, "查询运营商账户实名管控失败", scopeErr)
}
if skippable {
priority.FailFinal(ctx, "所属运营商账户未开启实名管控,跳过实名查询")
h.base.logger.Debug("所属运营商账户未开启实名管控,跳过实名查询", zap.Uint("card_id", cardID), zap.Uint("carrier_id", card.CarrierID))
return h.base.requeueCard(ctx, cardID, constants.TaskTypePollingRealname)
}
priority.MarkExecution(ctx)