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,
|
||||
CarrierType: c.CarrierType,
|
||||
CarrierName: c.CarrierName,
|
||||
RealnamePolicy: c.RealnamePolicy,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -377,6 +378,7 @@ func (s *Service) GetRealtimeStatus(ctx context.Context, assetType string, id ui
|
||||
CarrierID: c.CarrierID,
|
||||
CarrierType: c.CarrierType,
|
||||
CarrierName: c.CarrierName,
|
||||
RealnamePolicy: c.RealnamePolicy,
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -607,11 +609,13 @@ func (s *Service) updateDeviceFromSyncInfo(ctx context.Context, deviceID uint, r
|
||||
return
|
||||
}
|
||||
|
||||
// 更新 is_current 标识(事务原子操作,per D-14 决策)
|
||||
if err := s.deviceSimBindingStore.UpdateIsCurrentByDeviceID(ctx, deviceID, resp.CurrentIccid); err != nil {
|
||||
logger.GetAppLogger().Warn("sync-info 更新 is_current 失败",
|
||||
zap.Uint("device_id", deviceID),
|
||||
zap.Error(err))
|
||||
if resp.CurrentIccid != "" {
|
||||
// 更新 is_current 标识(事务原子操作,per D-14 决策)
|
||||
if err := s.deviceSimBindingStore.UpdateIsCurrentByDeviceID(ctx, deviceID, resp.CurrentIccid); err != nil {
|
||||
logger.GetAppLogger().Warn("sync-info 更新 is_current 失败",
|
||||
zap.Uint("device_id", deviceID),
|
||||
zap.Error(err))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user