POST/hotelApi/getHotelRoomInfo开放/回调

获取酒店房型及sku列表信息

酒店 / 对外酒店接口· HotelApiController#getHotelRoomInfo

基本信息

  • 接口状态前端在用 置信度 高 免鉴权
  • 接口URLPOSThttps://dscp-dev.hn12301.net/open-api/hotelApi/getHotelRoomInfo
  • 请求方式POST
  • Content-Typeapplication/json
  • 暴露渠道开放/回调 前缀 /open-api
  • 名称来源源码注释
  • 调用方已确认在用 · 湘工惠商城(1 个前端)
  • 需求上下文获取低价日历接口;获取酒店房型及sku列表信息接口
  • 维护人 / 最后改动liuxu 2024-12-24 最近提交:获取低价日历接口;获取酒店房型及sku列表信息接口
  • 读写数据表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
  • 判定依据1 个调用点:xghmall/common/http.api.js

请求参数

Header 请求参数

参数名参数值是否必填参数类型描述说明
无(渠道统一鉴权头见《认证方式》)

Query 请求参数

参数名参数值是否必填参数类型描述说明
无

路径参数及说明

参数名参数值是否必填参数类型描述说明
无

Body 请求参数

Body 类型 HotelRoomInfoRequest
参数名参数值是否必填参数类型描述说明
hotelId…是Long → hotel_room_price_calendar.hotel_id
dates…是Date[]日期范围

认证方式

免鉴权:@Route(auth = false) —— 该接口不校验登录态,改动前确认调用方与签名校验。

响应参数

data 类型 List<HotelRoomTypeTreeResponse>
参数名参数值是否必填参数类型描述说明
id…否Longid → 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…否Longid → 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…否Longid → hotel_room_price_calendar.id
name…否String名称
type…否HotelTemplateType类型 1=酒店设施 2=酒店政策 3=其他 4=房型设施 5=房型政策
level…否Integer层级
sort…否Integer排���
children…否List<FacilityTree>子节点

响应示例

成功响应示例 code=0

{
  "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
由 tools/build.py 从 data/apis.json 生成 · 生成时间 2026-09-12 19:49 · 数据口径见说明 · 本页数字非手写,均来自同一份数据