fix: 修复资产卡列表未返回 realname_policy 字段
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m10s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m10s
buildDeviceResolveResponse 和 GetRealtimeStatus 中构建 BoundCardInfo 时 均遗漏了 RealnamePolicy 字段赋值,导致 resolve 和 realtime-status 两个接口的设备卡列表不返回实名认证策略。字段在 Model 和 DTO 中均 已定义,Service 层补充赋值即可。 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -198,6 +198,7 @@ func (s *Service) buildDeviceResolveResponse(ctx context.Context, device *model.
|
|||||||
CarrierID: c.CarrierID,
|
CarrierID: c.CarrierID,
|
||||||
CarrierType: c.CarrierType,
|
CarrierType: c.CarrierType,
|
||||||
CarrierName: c.CarrierName,
|
CarrierName: c.CarrierName,
|
||||||
|
RealnamePolicy: c.RealnamePolicy,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -377,6 +378,7 @@ func (s *Service) GetRealtimeStatus(ctx context.Context, assetType string, id ui
|
|||||||
CarrierID: c.CarrierID,
|
CarrierID: c.CarrierID,
|
||||||
CarrierType: c.CarrierType,
|
CarrierType: c.CarrierType,
|
||||||
CarrierName: c.CarrierName,
|
CarrierName: c.CarrierName,
|
||||||
|
RealnamePolicy: c.RealnamePolicy,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -607,11 +609,13 @@ func (s *Service) updateDeviceFromSyncInfo(ctx context.Context, deviceID uint, r
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新 is_current 标识(事务原子操作,per D-14 决策)
|
if resp.CurrentIccid != "" {
|
||||||
if err := s.deviceSimBindingStore.UpdateIsCurrentByDeviceID(ctx, deviceID, resp.CurrentIccid); err != nil {
|
// 更新 is_current 标识(事务原子操作,per D-14 决策)
|
||||||
logger.GetAppLogger().Warn("sync-info 更新 is_current 失败",
|
if err := s.deviceSimBindingStore.UpdateIsCurrentByDeviceID(ctx, deviceID, resp.CurrentIccid); err != nil {
|
||||||
zap.Uint("device_id", deviceID),
|
logger.GetAppLogger().Warn("sync-info 更新 is_current 失败",
|
||||||
zap.Error(err))
|
zap.Uint("device_id", deviceID),
|
||||||
|
zap.Error(err))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user