From 4220578991a8628e8ec4bf77910a973e11f3f038 Mon Sep 17 00:00:00 2001 From: API Changelog Bot Date: Fri, 27 Mar 2026 18:32:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=8F=E7=A8=8B=E5=BA=8F=E9=80=80?= =?UTF-8?q?=E6=AC=BE=E6=94=BF=E7=AD=96=E8=BF=94=E5=9B=9E=E8=A7=84=E5=88=99?= =?UTF-8?q?=E6=96=87=E5=AD=97=20(PR=20#26)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- .../2026-03/27_1832_refund_policy_text.md | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 changelogs/2026-03/27_1832_refund_policy_text.md diff --git a/changelogs/2026-03/27_1832_refund_policy_text.md b/changelogs/2026-03/27_1832_refund_policy_text.md new file mode 100644 index 0000000..79bce18 --- /dev/null +++ b/changelogs/2026-03/27_1832_refund_policy_text.md @@ -0,0 +1,63 @@ +# 小程序产品详情:退款政策返回规则文字 + +**日期**: 2026-03-27 +**类型**: BUG修复 +**影响服务**: hl-product-service +**影响接口**: `GET /mp/product/{productId}` + +--- + +## 变更说明 + +产品详情接口新增 `refundPolicies` 字段,按支付类型分组返回退款政策的名称和规则文字。 + +原有的 `refundPolicyIds` 字段保持不变(后台管理用)。 + +## 新增字段 + +### refundPolicies + +| 字段 | 类型 | 说明 | +|------|------|------| +| refundPolicies | Map | key=支付类型(FULL/DEPOSIT/BALANCE),value=政策列表 | +| └ policyName | String | 政策名称 | +| └ rules | List | 规则文字列表 | + +### 响应示例(新增部分) + +```json +{ + "refundPolicyIds": { + "DEPOSIT": "1,3,4", + "BALANCE": "1,3,4" + }, + "refundPolicies": { + "DEPOSIT": [ + { + "policyName": "标准退款政策", + "rules": [ + "出发前7天及以上取消,全额退款", + "出发前3天及以上取消,退款50%", + "出发当天取消,不予退款" + ] + } + ], + "BALANCE": [ + { + "policyName": "标准退款政策", + "rules": [ + "出发前7天及以上取消,全额退款", + "出发前3天及以上取消,退款50%", + "出发当天取消,不予退款" + ] + } + ] + } +} +``` + +## 前端使用建议 + +小程序产品详情页「取消政策」部分,直接遍历 `refundPolicies` 展示: +- 按支付类型分区(如"定金退款政策"、"尾款退款政策") +- 每个政策显示 `policyName` 标题 + `rules` 列表