feat: 不轮询清单与批量开关轮询
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m35s

- 新增不轮询清单 tb_card_polling_pause(迁移 000256 补写存量),所有改 enable_polling 的入口同事务写清单
- 卡、设备勾选批量开关轮询(单次 500,逐项结果,开启跳过风险停机与已销户)与 CSV 文件导入
- 订单套餐生效、改有效期后自动恢复轮询并按规则评估复机
- 不轮询清单查询与导出;卡、设备列表与导出增加是否轮询
- 失败告警停机被拒视图、导出与批量关闭轮询;开关轮询影响说明

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
邹进
2026-10-26 03:07:20 +09:00
parent a4e3fe4d8f
commit 7ddb9312e3
45 changed files with 2250 additions and 50 deletions

View File

@@ -221,6 +221,9 @@ func (s *DeviceStore) applyDeviceFilters(ctx context.Context, query *gorm.DB, fi
if hasActive, ok := filters["has_active_package"].(bool); ok {
query = s.applyHasActivePackageFilter(query, hasActive)
}
if enablePolling, ok := filters["enable_polling"].(bool); ok {
query = query.Where("enable_polling = ?", enablePolling)
}
if enterpriseID, ok := filters["authorized_enterprise_id"].(uint); ok && enterpriseID > 0 {
// 只返回当前有效授权给该企业的设备
query = query.Where("id IN (?)",

View File

@@ -905,6 +905,9 @@ func (s *IotCardStore) applyStandaloneFilters(ctx context.Context, query *gorm.D
if realNameStatus, ok := filters["real_name_status"].(int); ok {
query = query.Where("real_name_status = ?", realNameStatus)
}
if enablePolling, ok := filters["enable_polling"].(bool); ok {
query = query.Where("enable_polling = ?", enablePolling)
}
if enterpriseID, ok := filters["authorized_enterprise_id"].(uint); ok && enterpriseID > 0 {
// 只返回有效授权给该企业的卡
query = query.Where("id IN (?)",