POST
/hotelApi/getHotelRoomInfo开放/回调获取酒店房型及sku列表信息
酒店 / 对外酒店接口
基本信息
- 接口状态前端在用 免鉴权
- 接口URLPOST
https://dscp-dev.hn12301.net/open-api/hotelApi/getHotelRoomInfo - 请求方式
POST - Content-Type
application/json - 暴露渠道开放/回调 前缀
/open-api - 名称来源源码注释
- 调用方已确认在用 · 湘工惠商城(1 个前端)
- 需求上下文
- 维护人 / 最后改动liuxu 2024-12-24
- 读写数据表
hotel_room_price_calendar反查该表全部接口 → - 控制器
com.jxxx.dscp.api.controller.hotel.HotelApiController#getHotelRoomInfo - 源码位置
jxxx-dscp/dscp-service-business/src/main/java/com/jxxx/dscp/api/controller/hotel/HotelApiController.java:494 - 判定依据
请求参数
Header 请求参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| 无(渠道统一鉴权头见《认证方式》) | ||||
Query 请求参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| 无 | ||||
路径参数及说明
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| 无 | ||||
Body 请求参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| hotelId | … | 是 | Long | → hotel_room_price_calendar.hotel_id |
| dates | … | 是 | Date[] | 日期范围 |
认证方式
响应参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| id | … | 否 | Long | id → hotel_room_price_calendar.id |
| hotelId | … | 否 | Long | 酒店ID → hotel_room_price_calendar.hotel_id |
| name | … | 否 | String | 房型名称 |
| basePrice | … | 否 | Integer | 基础价格(分) → hotel_room_price_calendar.base_price |
| sort | … | 否 | Integer | 排序号 |
| status | … | 否 | Integer | 状态(0正常 1停用) → hotel_room_price_calendar.status |
| coverImage | … | 否 | String | 主图URL |
| images | … | 否 | String | 房型图片,多个用逗号分隔 |
| roomTypeArea | … | 否 | BigDecimal | 面积(平方米) |
| floorInfo | … | 否 | String | 楼层信息 |
| windowType | … | 否 | WindowType | 窗户类型 1=无窗 2=部分有窗 3=全部有窗 |
| bedInfo | … | 否 | String | 床型 |
| guests | … | 否 | Integer | 可住人数 |
| smoking | … | 否 | Integer | 是否禁烟(0否 1是) |
| networkType | … | 否 | NetworkType | 网络类型 1=免费WiFi 2=收费WiFi 3=无网络 |
| extraBedAllowed | … | 否 | Integer | 是否可加床(0否 1是) |
| extraBedDesc | … | 否 | String | 加床说明 |
| facilities | … | 否 | List<FacilityTree> | 设施列表 |
| showPrice | … | 否 | Integer | |
| pricePlans | … | 否 | List<HotelRoomTypePlan> | 价格方案列表 |
| id | … | 否 | Long | id → hotel_room_price_calendar.id |
| hotelId | … | 否 | Long | 酒店ID → hotel_room_price_calendar.hotel_id |
| roomTypeId | … | 否 | Long | 房型ID → hotel_room_price_calendar.room_type_id |
| name | … | 否 | String | 方案名称 |
| autoConfirm | … | 否 | Integer | 是否自动确认 |
| breakfast | … | 否 | Integer | 是否含早 |
| basePrice | … | 否 | Integer | 底价(分) → hotel_room_price_calendar.base_price |
| salePrice | … | 否 | Integer | 卖价(分) → hotel_room_price_calendar.sale_price |
| stockType | … | 否 | StockType | 库存类型 0=无限 1=共享 2=独立 |
| stockNum | … | 否 | Integer | 数量 |
| cancelType | … | 否 | CancelType | 取消类型 1=免费取消 2=不可取消 3=有条件取消 |
| cancelDays | … | 否 | Integer | 提前取消天数,0表示入住当天 |
| cancelHours | … | 否 | String | 取消截止时间点,如18:00 |
| sort | … | 否 | Integer | 排序号 |
| status | … | 否 | Integer | 状态 → hotel_room_price_calendar.status |
| isDeleted | … | 否 | Boolean | 是否删除(0否 1是) → hotel_room_price_calendar.is_deleted |
| createdBy | … | 否 | Long | 创建人ID → hotel_room_price_calendar.created_by |
| createdTime | … | 否 | Date | 创建时间 → hotel_room_price_calendar.created_time |
| updatedBy | … | 否 | Long | 更新人ID → hotel_room_price_calendar.updated_by |
| updatedTime | … | 否 | Date | 更新时间 → hotel_room_price_calendar.updated_time |
| id | … | 否 | Long | id → hotel_room_price_calendar.id |
| name | … | 否 | String | 名称 |
| type | … | 否 | HotelTemplateType | 类型 1=酒店设施 2=酒店政策 3=其他 4=房型设施 5=房型政策 |
| level | … | 否 | Integer | 层级 |
| sort | … | 否 | Integer | 排��� |
| children | … | 否 | List<FacilityTree> | 子节点 |
响应示例
成功响应示例
{
"errcode": 0,
"errmsg": "",
"data": {
"id": "1",
"hotelId": "1",
"name": "\"string\"",
"basePrice": "1",
"sort": "1",
"status": "1",
"coverImage": "\"string\"",
"images": "\"string\"",
"roomTypeArea": "1.0",
"floorInfo": "\"string\"",
"windowType": "1",
"bedInfo": "\"string\""
}
}附录 · 实现细节
调用链 / 数据表 / 调用点证据 / 源码注释 / 逻辑摘要
涉及数据表:hotel_room_price_calendar 反查全部引用接口 →
- HotelApiController#getHotelRoomInfo
- HotelRoomPriceCalendarService#queryList(HotelRoomPriceCalendarServiceImpl)
- HotelRoomPriceCalendarMapper#queryList
逻辑摘要:列表查询(hotelRoomPriceCalendarService.queryList)
源码内联注释(旧站解析结果)
- 每个sku从价格日历表去设置的价格
- 房间战士价格
旧站环境备注:pro:(仓库 .env.pro 指向 uat;生产域名未确认,此处沿用 uat 主机示意)
调用点证据
xghmall/common/http.api.js:61湘工惠商城 · getHotelRoomInfoUrl