POST
/hotel/getHotelInfo管理后台酒店信息表-详情
酒店 / 酒店·信息
基本信息
- 接口状态前端在用
- 接口URLPOST
https://dscp-dev.hn12301.net/manage-api/hotel/getHotelInfo - 请求方式
POST - Content-Type
application/json - 暴露渠道管理后台 前缀
/manage-api - 名称来源源码注释
- 调用方已确认在用 · 管理后台(1 个前端)
- 需求上下文
- 维护人 / 最后改动hao 2024-12-17
- 读写数据表
hotel_facility_rel、hotel_facility、hotel_info反查该表全部接口 → - 控制器
com.jxxx.dscp.api.controller.hotel.HotelInfoController#getHotelInfo - 源码位置
jxxx-dscp/dscp-service-business/src/main/java/com/jxxx/dscp/api/controller/hotel/HotelInfoController.java:210 - 判定依据
请求参数
Header 请求参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| 无(渠道统一鉴权头见《认证方式》) | ||||
Query 请求参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| 无 | ||||
路径参数及说明
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| 无 | ||||
Body 请求参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| id | … | 是 | Long | id → hotel_facility.id |
认证方式
响应参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| id | … | 否 | Long | id → hotel_facility.id |
| merchantId | … | 否 | Long | 商户ID → hotel_info.merchant_id |
| shopId | … | 否 | Long | 店铺ID → hotel_info.shop_id |
| name | … | 否 | String | 酒店名称 → hotel_facility.name |
| grade | … | 否 | HotelGrade | 酒店等级 → hotel_info.grade 1=二星及以下/经济 2=三星/舒适 3=四星/高档 4=五星/豪华 5=奢华 |
| type | … | 否 | HotelType | → hotel_facility.type 1=酒店 2=民宿 3=公寓 4=青年旅社 5=别墅 6=度假村 7=客栈 8=农家乐 9=汽车旅馆 10=露营地 99=其他 |
| openingYear | … | 否 | Integer | 开业年份 → hotel_info.opening_year |
| roomCount | … | 否 | Integer | 房间数量 → hotel_info.room_count |
| phone | … | 否 | String | 联系电话 → hotel_info.phone |
| coverImage | … | 否 | String | 封面图片 → hotel_info.cover_image |
| address | … | 否 | String | 地址 → hotel_info.address |
| landmark | … | 否 | String | 地标 → hotel_info.landmark |
| provinceId | … | 否 | Long | 省id → hotel_info.province_id |
| cityId | … | 否 | Long | 市id → hotel_info.city_id |
| districtId | … | 否 | Long | 区县id → hotel_info.district_id |
| longitude | … | 否 | BigDecimal | 经度 → hotel_info.longitude |
| latitude | … | 否 | BigDecimal | 纬度 → hotel_info.latitude |
| highlights | … | 否 | String | 亮点介绍 → hotel_info.highlights |
| tags | … | 否 | String | 酒店标签 → hotel_info.tags |
| locationTags | … | 否 | String | 位置标签 → hotel_info.location_tags |
| images | … | 否 | String | 酒店图片,多个用逗号分隔 → hotel_info.images |
| status | … | 否 | Integer | 状态(0正常 1停用) → hotel_info.status |
| score | … | 否 | BigDecimal | |
| distance | … | 否 | BigDecimal | |
| facilities | … | 否 | List<FacilityTree> | 设施列表 |
| id | … | 否 | Long | id → hotel_facility.id |
| name | … | 否 | String | 名称 → hotel_facility.name |
| type | … | 否 | FacilityType | 类型 → hotel_facility.type 1=酒店设施 2=酒店政策 3=其他 |
| level | … | 否 | Integer | 层级 → hotel_facility.level |
| sort | … | 否 | Integer | 排序 → hotel_facility.sort |
| children | … | 否 | List<FacilityTree> | 子节点 |
| nearbyHotel | … | 否 | List<HotelInfoResponse> | 附件酒店 */ |
| id | … | 否 | Long | 酒店ID → hotel_facility.id |
| name | … | 否 | String | 酒店名称 → hotel_facility.name |
| grade | … | 否 | HotelGrade | 酒店等级,1二星及以下/经济,2三星/舒适,3四星/高档,4五星/豪华,5奢华 → hotel_info.grade 1=二星及以下/经济 2=三星/舒适 3=四星/高档 4=五星/豪华 5=奢华 |
| type | … | 否 | HotelType | → hotel_facility.type 1=酒店 2=民宿 3=公寓 4=青年旅社 5=别墅 6=度假村 7=客栈 8=农家乐 9=汽车旅馆 10=露营地 99=其他 |
| status | … | 否 | Integer | 状态,0正常,1停用 → hotel_info.status |
| openingYear | … | 否 | Integer | 开业年份 → hotel_info.opening_year |
| roomCount | … | 否 | Integer | 房间数量 → hotel_info.room_count |
| roomTypeCount | … | 否 | Long | 房型数量 |
| phone | … | 否 | String | 联系电话 → hotel_info.phone |
| address | … | 否 | String | 详细地址 → hotel_info.address |
| landmark | … | 否 | String | 地标 → hotel_info.landmark |
| provinceId | … | 否 | Long | 省id → hotel_info.province_id |
| cityId | … | 否 | Long | 市id → hotel_info.city_id |
| districtId | … | 否 | Long | 区县id → hotel_info.district_id |
| longitude | … | 否 | BigDecimal | 经度 → hotel_info.longitude |
| latitude | … | 否 | BigDecimal | 纬度 → hotel_info.latitude |
| coverImage | … | 否 | String | 主图URL → hotel_info.cover_image |
| images | … | 否 | String | 轮播图URL,多个用逗号分隔 → hotel_info.images |
| tags | … | 否 | String | 酒店标签,多个用逗号分隔 → hotel_info.tags |
| locationTags | … | 否 | String | 位置描述标签,多个用逗号分隔 → hotel_info.location_tags |
| highlights | … | 否 | String | 酒店亮点(富文本) → hotel_info.highlights |
| isDeleted | … | 否 | Boolean | 是否删除(0否 1是) → hotel_facility.is_deleted |
| createdBy | … | 否 | Long | 创建人ID → hotel_facility.created_by |
| createdTime | … | 否 | Date | 创建时间 → hotel_facility.created_time |
| updatedBy | … | 否 | Long | 更新人ID → hotel_facility.updated_by |
| updatedTime | … | 否 | Date | 更新时间 → hotel_facility.updated_time |
| score | … | 否 | BigDecimal | |
| lowestPrice | … | 否 | BigDecimal | |
| distance | … | 否 | BigDecimal |
响应示例
成功响应示例
{
"errcode": 0,
"errmsg": "",
"data": {
"id": "1",
"merchantId": "1",
"shopId": "1",
"name": "\"string\"",
"grade": "1",
"type": "1",
"openingYear": "1",
"roomCount": "1",
"phone": "\"string\"",
"coverImage": "\"string\"",
"address": "\"string\"",
"landmark": "\"string\""
}
}失败响应示例
{
"data": null,
"可能返回": [
{
"errcode": "99999",
"errmsg": "服务内部错误"
}
]
}附录 · 实现细节
调用链 / 数据表 / 调用点证据 / 源码注释 / 逻辑摘要
涉及数据表:hotel_facility_rel、hotel_facility、hotel_info 反查全部引用接口 →
- HotelInfoController#getHotelInfo
- HotelFacilityRelService#queryList(HotelFacilityRelServiceImpl)
- HotelFacilityRelMapper#queryList
- HotelFacilityService#queryList(HotelFacilityServiceImpl)
- HotelFacilityMapper#queryList
- BeanUtils.map → HotelInfoDetailResponse
逻辑摘要:查询详情(hotelInfoService.get);列表查询(hotelFacilityRelService.queryList);列表查询(hotelFacilityService.queryList);入参与返回值经 BeanUtils 做对象/分页映射
源码内联注释(旧站解析结果)
- 1. 查询酒店基本信息
- 2. 查询酒店关联的所有设施
- 3. 查询设施详情
- 4. 构建设施树
旧站环境备注:pro:(仓库 .env.pro 指向 uat;生产域名未确认,此处沿用 uat 主机示意)
调用点证据
dscp-html-manage/src/api/hotel/hotel.ts:24管理后台 · request
可能抛出的业务码:99999 服务内部错误 错误码字典 →