diff --git a/changelogs/2026-04/0415-mp-detail-fields.md b/changelogs/2026-04/0415-mp-detail-fields.md new file mode 100644 index 0000000..9467da4 --- /dev/null +++ b/changelogs/2026-04/0415-mp-detail-fields.md @@ -0,0 +1,71 @@ +# 小程序产品接口字段补全+bug修复 + +**日期**: 2026-04-15 +**服务**: hl-product-service-v2 +**影响**: 小程序端产品相关页面 + +--- + +## 1. MP产品详情 `GET /mp/product/{id}` — 新增字段 + +### 基础信息 +| 字段 | 类型 | 说明 | +|------|------|------| +| `tags` | `List` | 产品标签,如`["亲子","露营"]` | +| `seasons` | `List` | 产品季节,如`["summer"]` | +| `lineId` | `Long` | 产品线ID(面包屑导航用) | +| `lineName` | `String` | 产品线名称 | +| `tiers` | `Array` | 档位列表(行程报价区块),如`[{"tierSeq":1,"tierName":"舒适"}]` | +| `startPrice` | `BigDecimal` | 起步价(未来可售最低成人售价) | + +### 路线概览 +| 字段 | 类型 | 说明 | +|------|------|------| +| `totalMileage` | `BigDecimal` | 总里程(km) | +| `routeDescription` | `String` | 路线描述文本 | + +### 营销内容 +| 字段 | 类型 | 说明 | +|------|------|------| +| `quickUnderstand` | `Object` | 快速理解(JSON对象) | +| `childExperience` | `Object` | 孩子经历 | +| `growthGains` | `Object` | 成长收获 | +| `yearReview` | `Object` | 年度回顾视频 | +| `closing` | `Object` | 写在最后 | + +### 保障须知 +| 字段 | 类型 | 说明 | +|------|------|------| +| `safetyItems` | `Array` | 安全保障项(如`[{"title":"保险","desc":"50万"}]`) | +| `faqItems` | `Array` | FAQ问答 | +| `bookingTermsContent` | `String` | 预订条款内容(HTML) | +| `warmTipsContent` | `String` | 温馨提示内容(HTML) | +| `insuranceNotice` | `String` | 保险告知(INCLUDED/EXCLUDED/OPTIONAL) | +| `equipmentAdvice` | `String` | 装备建议(HTML) | + +### 行程天 `itinerary[].` 新增 +| 字段 | 类型 | 说明 | +|------|------|------| +| `photoUrls` | `List` | 行程天照片列表 | +| `hotels` | `Array` | 每日住宿,`[{"hotelName":"xxx","tierSeq":1}]` | + +### 人群优惠 `crowdBenefit.` 新增 +| 字段 | 类型 | 说明 | +|------|------|------| +| `elderAccommodation` | `String` | 老人住宿(之前遗漏) | + +--- + +## 2. 产品对比接口变更 + +**旧**: `GET /mp/product/compare?ids=1,2,3` +**新**: `POST /mp/product/compare?lineId={产品线ID}` + +传入产品线ID,自动返回该线下所有已上架产品的详情列表,无需前端知道具体产品ID。 + +--- + +## 3. Bug修复 + +- **产品线列表过滤**: `GET /mp/product-line/list` 现在只返回有上架产品的产品线(之前返回所有启用的线,包括空线) +- **网关白名单**: `/mp/product/*/schedules` 和 `/mp/product/*/tier-compare` 已加入JWT跳过列表,无需登录