feat:Rock刷新去UID拦截,新增绑定错误自动刷新与使用/绑定超时预警

This commit is contained in:
2026-11-08 18:03:48 +08:00
parent 1dba8e4c2e
commit 51dcb9de5a
22 changed files with 768 additions and 182 deletions
@@ -51,9 +51,14 @@ func (s *RockService) ListDeletedRockTokens(ctx context.Context, page, pageSize
return nil, 0, errors.New("无效的 Token 状态筛选")
}
cfg, err := s.GetConfig(ctx)
if err != nil {
return nil, 0, err
}
warnDays, _, boundWarnDays := rockOverdueThresholds(cfg)
db := applyRockTokenListFilters(
s.db.WithContext(ctx).Unscoped().Model(&model.RockToken{}).Where("deleted_at IS NOT NULL"),
status, search,
status, search, time.Now(), warnDays, boundWarnDays,
)
var total int64