2.1 KiB
2.1 KiB
小程序 - 用车详情补齐 座位数 / 车辆分类 / 驾龄要求 / 配置亮点 4 字段
日期: 2026-04-24 PR: #1366 (dev, commit 5899ae9f) Issue: #1350 类型: fix 服务: hl-mp-service
接口
GET /mp/order/{orderId}/vehicle
订单详情页「服务包含 · 用车详情」弹窗接口。
变更
response data 新增 4 字段:
| 字段 | 类型 | 说明 | 示例 |
|---|---|---|---|
seatCount |
Integer |
座位数(来自产品快照 vehicleModels) | 6 |
vehicleCategory |
String |
字典 vehicle_type: CAR=小轿车 / SUV=越野车 / VAN=商务车 / BUS=大巴 / MINIBUS=中巴 |
"VAN" |
driverYearsRequired |
String |
驾龄要求(资源服务暂未提供,当前固定 null) | null |
features |
List<String> |
配置/亮点列表(资源服务暂未提供,当前固定 null) | null |
旧字段保持不变:vehicleType / vehicleCount / coverUrl / plateNumber / driverName / driverPhone / matched。
示例响应
{
"code": 200,
"message": "成功",
"success": true,
"data": {
"vehicleType": "豪华suv",
"vehicleCount": 1,
"coverUrl": null,
"plateNumber": null,
"driverName": "够不够",
"driverPhone": "1521451212",
"matched": true,
"seatCount": 5,
"vehicleCategory": "GROUP",
"driverYearsRequired": null,
"features": null
}
}
前端接入建议
- 弹窗内
座位数标签改读seatCount,旧实现若读vehicleType包含「6座」文案可保留兜底 - 「车辆分类」展示用
vehicleCategory对字典vehicle_type翻译(前端 i18n 字典已有) driverYearsRequired/features为 null 时不渲染对应行,待资源服务后续补数据再显示
根因说明(前端不关心,仅存档)
mp-service BFF VO 与 order-v2 源端 VO 同名但字段数不一致,Feign 反序列化丢弃多余字段。本 PR 只补 BFF 端 VO,order-v2 源端早已返回该 4 字段。
E2E 验证(2026-04-24 测试服)
订单 HL20260423175303-5448 直连 mp-service 127.0.0.1:8085 response 完整含 4 字段。