feat: 资产信息接口返回当前登录用户绑定手机号
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m30s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m30s
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user