hl-api-changelog/changelogs/2026-04/2026-04-16_mp-hotel-list-by-day-tier.md

111 行
3.6 KiB
Markdown

此文件含有模棱两可的 Unicode 字符

此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。

# 小程序端 — 按天+档位查看酒店列表
- **日期**: 2026-04-16
- **服务**: hl-product-service-v2
- **类型**: 使用指南
## 接口
```
GET /mp/product/{id}/day/{dayNumber}/hotels
```
**无需登录**,已加入网关白名单。
## 参数
| 参数 | 位置 | 类型 | 必填 | 说明 |
|------|------|------|------|------|
| id | path | Long | 是 | 产品ID |
| dayNumber | path | Integer | 是 | 天序号从1开始 |
## 响应示例
```json
{
"code": 200,
"data": {
"dayNumber": 1,
"tiers": [
{
"tierSeq": 1,
"tierName": "舒适",
"hotels": [
{
"hotelId": 2023714929877450753,
"name": "海拉尔洲际酒店",
"hotelType": "HOTEL",
"starLevel": "FIVE",
"province": "内蒙古",
"city": "呼伦贝尔",
"district": "海拉尔区",
"address": "河东新区...",
"longitude": 119.736,
"latitude": 49.212,
"coverUrl": "https://oss.xxx/cover.jpg",
"bannerUrls": ["https://oss.xxx/1.jpg", "https://oss.xxx/2.jpg"],
"facilities": "{\"wifi\":true,\"parking\":true}",
"highlights": "{\"items\":[\"草原景观房\"]}",
"description": "五星级草原度假酒店...",
"checkInTime": "14:00",
"checkOutTime": "12:00",
"checkInNotes": "需携带身份证",
"tags": ["五星级", "草原景观"],
"roomTypeId": 3002000000000000013,
"roomTypeName": "豪华大床房",
"roomCount": 2
}
]
},
{
"tierSeq": 2,
"tierName": "高档",
"hotels": [
{
"hotelId": 2023714929877450800,
"name": "呼伦贝尔香格里拉大酒店",
"coverUrl": "https://oss.xxx/cover2.jpg",
"roomTypeName": "行政套房",
"roomCount": 2
}
]
}
]
}
}
```
## 字段说明
| 字段 | 类型 | 说明 |
|------|------|------|
| `tiers` | List | 按档位分组的酒店列表 |
| `tiers[].tierSeq` | Integer | 档位序号1=舒适,2=高档等) |
| `tiers[].tierName` | String | 档位名称 |
| `tiers[].hotels` | List | 该档位下的酒店列表 |
| `hotels[].hotelId` | Long | 酒店ID |
| `hotels[].name` | String | 酒店名称 |
| `hotels[].hotelType` | String | 住宿类型字典hotel_type: HOTEL/HOMESTAY/RESORT/CAMPSITE |
| `hotels[].starLevel` | String | 星级字典hotel_star: THREE/FOUR/FIVE/BOUTIQUE |
| `hotels[].coverUrl` | String | 封面图URL |
| `hotels[].bannerUrls` | List\<String\> | 横幅图URL列表 |
| `hotels[].address` | String | 详细地址 |
| `hotels[].longitude` | BigDecimal | 经度 |
| `hotels[].latitude` | BigDecimal | 纬度 |
| `hotels[].facilities` | String | 设施配置JSON |
| `hotels[].highlights` | String | 酒店亮点JSON |
| `hotels[].description` | String | 酒店描述 |
| `hotels[].checkInTime` | String | 入住时间 |
| `hotels[].checkOutTime` | String | 退房时间 |
| `hotels[].tags` | List\<String\> | 标签列表 |
| `hotels[].roomTypeId` | Long | 绑定的房型ID |
| `hotels[].roomTypeName` | String | 绑定的房型名称 |
| `hotels[].roomCount` | Integer | 房间数 |
## 前端使用场景
1. **每日行程页 → 点击"住宿"区块** → 调此接口获取当天酒店详情
2. 单档位产品:`tiers` 只有1个元素,直接展示 `hotels`
3. 多档位产品:用 tab 切换档位,按 `tierSeq` 展示对应 `hotels`
4. 点击某个酒店 → 可继续调 `GET /mp/product/hotel/{hotelId}/room-types` 查看房型列表