diff --git a/internal/handler/app/client_asset.go b/internal/handler/app/client_asset.go index f2b3903..c0a88a7 100644 --- a/internal/handler/app/client_asset.go +++ b/internal/handler/app/client_asset.go @@ -148,7 +148,10 @@ func (h *ClientAssetHandler) GetAssetInfo(c *fiber.Ctx) error { return err } + phone, _ := middleware.GetCustomerPhone(c) + resp := &dto.AssetInfoResponse{ + BoundPhone: phone, AssetType: resolved.Asset.AssetType, AssetID: resolved.Asset.AssetID, Identifier: resolved.Identifier, diff --git a/internal/model/dto/client_asset_dto.go b/internal/model/dto/client_asset_dto.go index 34bd989..9b5e4e4 100644 --- a/internal/model/dto/client_asset_dto.go +++ b/internal/model/dto/client_asset_dto.go @@ -14,6 +14,9 @@ type AssetInfoRequest struct { // AssetInfoResponse B1 资产信息响应 // 根据 asset_type 不同,设备专属字段或卡专属字段会分别填充(另一侧为零值/omit) type AssetInfoResponse struct { + // === 登录用户信息 === + BoundPhone string `json:"bound_phone" description:"当前登录用户绑定的手机号"` + // === 基础信息(通用) === AssetType string `json:"asset_type" description:"资产类型(card:卡, device:设备)"` AssetID uint `json:"asset_id" description:"资产ID"`