From 8706247436a3da2b0306e5e4fd2af79500c610ac Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 14 Apr 2026 17:10:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B5=84=E4=BA=A7=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=20BoundCardInfo=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=BF=90=E8=90=A5=E5=95=86=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/model/dto/asset_dto.go | 3 +++ internal/service/asset/service.go | 6 ++++++ 2 files changed, 9 insertions(+) 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, }) } }