diff --git a/changelogs/2026-03/26_0905_xmm_detail_fields.md b/changelogs/2026-03/26_0905_xmm_detail_fields.md index d89018c..4b3b285 100644 --- a/changelogs/2026-03/26_0905_xmm_detail_fields.md +++ b/changelogs/2026-03/26_0905_xmm_detail_fields.md @@ -146,9 +146,45 @@ --- +## 五、预订须知(所有产品类型通用) + +小程序产品详情已返回以下字段(点击展开纯文字内容): + +| 字段 | 位置 | 说明 | +|------|------|------| +| `product.bookingTermsContent` | ProductVO | 预订条款全文 | +| `product.warmTipsContent` | ProductVO | 温馨提示全文 | +| `refundPolicies` | MpProductDetailVO | 取消政策(按支付方式分组) | + +### 取消政策(退款政策)返回结构 + +`refundPolicies` 按支付方式分组,每个政策新增 `description` 纯文字字段: + +```json +{ + "FULL": { + "policyId": 1, + "policyName": "标准退款政策", + "description": "出发前30天以上取消,退全款;出发前15-30天取消,退80%;出发前15天内取消,不可退", + "rules": [ + { "ruleId": 1, "minDays": 30, "refundRatio": 100 }, + { "ruleId": 2, "minDays": 15, "refundRatio": 80 }, + { "ruleId": 3, "minDays": 0, "refundRatio": 0 } + ] + }, + "DEPOSIT": { ... } +} +``` + +前端可直接用 `description` 展示文字,无需自己拼接规则。按产品的 `pricing.paymentType` 显示对应的退款政策: +- `FULL` → 显示 FULL 的 description +- `DEPOSIT` → 显示 DEPOSIT 和 BALANCE 的 description + +--- + ## 前端对接要点 -1. **batchCount / hotelSummary**: 自动计算字段,无需后台录入,GROUP产品详情自动返回 -2. **年龄/摄影/餐饮/安全/价格**: 需要在管理后台"编辑产品"时配置对应数据,否则返回 null +1. **batchCount / hotelSummary / priceTiers / leaderInfoList**: 自动计算字段,无需后台录入,GROUP产品详情自动返回 +2. **年龄/摄影/餐饮/安全**: 需要在管理后台"编辑产品"时配置对应数据,否则返回 null 3. **所有新字段向后兼容**: 未配置时返回 null,不影响已有字段 4. **保存/更新产品接口同步支持**: `POST /product/save`、`PUT /product/{id}` 都可传入新字段