diff --git a/internal/model/dto/asset_dto.go b/internal/model/dto/asset_dto.go index 8c0084f..fe66ae9 100644 --- a/internal/model/dto/asset_dto.go +++ b/internal/model/dto/asset_dto.go @@ -70,6 +70,9 @@ type BoundCardInfo struct { RealNameAt *time.Time `json:"real_name_at" description:"该卡最近一次完成实名的时间,未实名时为 null"` SlotPosition int `json:"slot_position,omitempty" description:"插槽位置"` IsCurrent bool `json:"is_current" description:"是否为当前使用的卡"` + CarrierID uint `json:"carrier_id,omitempty" description:"运营商ID"` + CarrierType string `json:"carrier_type,omitempty" description:"运营商类型"` + CarrierName string `json:"carrier_name,omitempty" description:"运营商名称"` } // AssetRealtimeStatusResponse 资产实时状态(只读DB/Redis) diff --git a/internal/service/asset/service.go b/internal/service/asset/service.go index f0efcdf..69e17e3 100644 --- a/internal/service/asset/service.go +++ b/internal/service/asset/service.go @@ -194,6 +194,9 @@ func (s *Service) buildDeviceResolveResponse(ctx context.Context, device *model. RealNameAt: c.FirstRealnameAt, SlotPosition: slotMap[c.ID], IsCurrent: isCurrentMap[c.ID], + CarrierID: c.CarrierID, + CarrierType: c.CarrierType, + CarrierName: c.CarrierName, }) } @@ -369,6 +372,9 @@ func (s *Service) GetRealtimeStatus(ctx context.Context, assetType string, id ui RealNameStatus: c.RealNameStatus, SlotPosition: slotMap[c.ID], IsCurrent: isCurrentMap[c.ID], + CarrierID: c.CarrierID, + CarrierType: c.CarrierType, + CarrierName: c.CarrierName, }) } }