From 41d3667df2b9eeff78bcc065e9a374ba9bc48937 Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 11 Apr 2026 11:59:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AE=BE=E5=A4=87=E5=8D=A1=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=96=B0=E5=A2=9E=E8=BF=90=E8=90=A5=E5=95=86=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在 DeviceCardItem DTO 和 GetDeviceCards Handler 中补充 carrier_type 字段,解决设备视角卡列表缺少运营商类型的问题 Co-authored-by: Sisyphus --- internal/handler/app/client_device.go | 1 + internal/model/dto/client_realname_device_dto.go | 1 + 2 files changed, 2 insertions(+) diff --git a/internal/handler/app/client_device.go b/internal/handler/app/client_device.go index 4713d26..b71a4ba 100644 --- a/internal/handler/app/client_device.go +++ b/internal/handler/app/client_device.go @@ -161,6 +161,7 @@ func (h *ClientDeviceHandler) GetDeviceCards(c *fiber.Ctx) error { CardID: card.ID, ICCID: card.ICCID, MSISDN: card.MSISDN, + CarrierType: card.CarrierType, CarrierName: card.CarrierName, NetworkStatus: networkStatusText(card.NetworkStatus), RealNameStatus: card.RealNameStatus, diff --git a/internal/model/dto/client_realname_device_dto.go b/internal/model/dto/client_realname_device_dto.go index e2750ac..b779bfe 100644 --- a/internal/model/dto/client_realname_device_dto.go +++ b/internal/model/dto/client_realname_device_dto.go @@ -39,6 +39,7 @@ type DeviceCardItem struct { CardID uint `json:"card_id" description:"卡ID"` ICCID string `json:"iccid" description:"物联网卡ICCID"` MSISDN string `json:"msisdn" description:"手机号"` + CarrierType string `json:"carrier_type" description:"运营商类型(CMCC/CUCC/CTCC/CBN)"` CarrierName string `json:"carrier_name" description:"运营商名称"` NetworkStatus string `json:"network_status" description:"网络状态"` RealNameStatus int `json:"real_name_status" description:"实名状态 (0:未实名, 1:已实名)"`