From 174a96b4c57cc00a7d5b2f7c89b26ffa4e35ded6 Mon Sep 17 00:00:00 2001 From: API Changelog Bot Date: Tue, 31 Mar 2026 17:30:12 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BB=B7=E6=A0=BC=E6=97=A5?= =?UTF-8?q?=E5=8E=86=E6=8E=A5=E5=8F=A3=E5=AD=97=E6=AE=B5=E4=BC=98=E5=8C=96?= =?UTF-8?q?=EF=BC=88price=E2=86=92adultPrice=EF=BC=89(PR=20#91)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...31_refactor_price_calendar_field_rename.md | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 changelogs/2026-03/31_refactor_price_calendar_field_rename.md diff --git a/changelogs/2026-03/31_refactor_price_calendar_field_rename.md b/changelogs/2026-03/31_refactor_price_calendar_field_rename.md new file mode 100644 index 0000000..0fccf3a --- /dev/null +++ b/changelogs/2026-03/31_refactor_price_calendar_field_rename.md @@ -0,0 +1,48 @@ +# 价格日历接口字段优化(price→adultPrice) + +- **日期**: 2026-03-31 +- **服务**: hl-product-service, hl-mp-service +- **PR**: #91 + +## ⚠️ 破坏性变更 + +### `GET /mp/product/{id}/price-calendar` + +**字段重命名**: +| 旧字段 | 新字段 | 说明 | +|--------|--------|------| +| `price` | `adultPrice` | 成人价格,与其他人员类型命名保持一致 | + +**移除字段**: +- `id` — 价格日历记录ID,前端无需使用 +- `productId` — 已在URL路径中,无需重复返回 +- `dateStr` — 与 `date` 重复 + +**完整响应结构**(每日一条): +```json +{ + "date": "2026-04-01", + "adultPrice": 3980, + "childPrice": 2980, + "youngChildPrice": 1490, + "babyPrice": 500, + "childWithBedFee": 200, + "stock": 10, + "sold": 2, + "status": 1, + "remark": null +} +``` + +**4种人员类型价格**: +| 字段 | 说明 | +|------|------| +| `adultPrice` | 成人价格 | +| `childPrice` | 儿童价格(占床) | +| `youngChildPrice` | 小童价格(不占床) | +| `babyPrice` | 幼童价格 | + +## 前端需要改动 + +1. 价格日历组件中 `price` 改为 `adultPrice` +2. 移除对 `id`、`productId`、`dateStr` 的依赖(如有)