fix: 卡或绑定设备关闭轮询时不再自动停复机

关闭轮询的卡/设备已导入其他卡管,去掉套餐到期、退款场景对暂停轮询卡的停机放行,
任何场景都不停机也不复机(单卡判断与设备下逐卡停机同步收口)。
场景判断函数更名为 StopResumeSceneIgnoresNetworkStatus,只保留不看库里开停状态的语义。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
邹进
2026-11-02 17:01:55 +09:00
parent f274f8bb58
commit dc816b44d0
4 changed files with 61 additions and 23 deletions

View File

@@ -22,8 +22,9 @@ const (
StopResumeSceneUsage = "usage" // 流量扣减后
)
// StopResumeSceneAllowsSuspendedStop 判断场景集合中是否含套餐失效类场景:暂停轮询的卡在这些场景下照常停机。
func StopResumeSceneAllowsSuspendedStop(scenes []string) bool {
// StopResumeSceneIgnoresNetworkStatus 判断场景集合中是否含套餐失效类场景(套餐到期、退款):
// 这些场景下停机判断不看库里的开停状态(上游状态有延迟可能是旧值)。暂停轮询的卡在任何场景下都不停机。
func StopResumeSceneIgnoresNetworkStatus(scenes []string) bool {
for _, scene := range scenes {
if scene == StopResumeScenePackageExpired || scene == StopResumeSceneRefund {
return true