fix: 改有效期自动恢复轮询识别 card 资产类型
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m24s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m24s
资产解析返回的卡类型为 card,恢复轮询按 iot_card 匹配,导致改有效期后关闭轮询的卡不恢复。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1504,6 +1504,10 @@ func (s *Service) restorePollingAfterExpiryChange(ctx context.Context, assetType
|
||||
if s.pollingRestorer == nil || assetID == 0 {
|
||||
return
|
||||
}
|
||||
// 资产解析返回的卡类型为 card,统一为 iot_card。
|
||||
if assetType == constants.AssetResolveTypeCard {
|
||||
assetType = constants.AssetTypeIotCard
|
||||
}
|
||||
column := "iot_card_id"
|
||||
if assetType == constants.AssetTypeDevice {
|
||||
column = "device_id"
|
||||
|
||||
@@ -264,6 +264,9 @@ func (s *AssetPollingService) RestoreAssetPolling(ctx context.Context, assetType
|
||||
ctx = auditcontext.With(ctx, auditcontext.Context{ActorKind: constants.AuditActorSystemTask, ActorID: "polling_auto_restore",
|
||||
ActorName: "套餐生效自动恢复轮询", Source: constants.AuditSourceWorker})
|
||||
}
|
||||
if assetType == constants.AssetResolveTypeCard {
|
||||
assetType = constants.AssetTypeIotCard
|
||||
}
|
||||
restored := false
|
||||
switch assetType {
|
||||
case constants.AssetTypeIotCard:
|
||||
|
||||
Reference in New Issue
Block a user