|
|
@@ -1354,7 +1354,7 @@ interactionType 取值:`PHONE` / `WECHAT` / `MEETING` / `OTHER`。
|
|
|
|
|
|
---
|
|
|
|
|
|
-### 4.38 商品赠送会员(`/api/membership/gift-membership-progress`)
|
|
|
+### 4.43 商品赠送会员(`/api/membership/gift-membership-progress`)
|
|
|
|
|
|
家庭维度累计「赠会员商品」原价实付金额,达到阈值后自动赠送会员。
|
|
|
|
|
|
@@ -1377,7 +1377,8 @@ interactionType 取值:`PHONE` / `WECHAT` / `MEETING` / `OTHER`。
|
|
|
"grantedLevel": null,
|
|
|
"grantedOrderNo": null,
|
|
|
"grantedAt": null,
|
|
|
- "threshold": 198000
|
|
|
+ "threshold": 198000,
|
|
|
+ "remaining": 40000
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
@@ -1387,11 +1388,13 @@ interactionType 取值:`PHONE` / `WECHAT` / `MEETING` / `OTHER`。
|
|
|
| `accumulatedAmount` | Integer | 累计赠会员商品原价金额(分),仅统计无积分/无券/无折扣的实付订单 |
|
|
|
| `granted` | Integer | 1=已赠送 0=未赠送 |
|
|
|
| `grantedLevel` | String | 已赠送的会员等级(当前全局配置默认 `FAMILY`) |
|
|
|
-| `threshold` | Integer | 阈值(分),由 `sys_config.gift_membership_threshold` 动态填入;无家庭时返回 `0` |
|
|
|
+| `threshold` | Integer | 阈值(分),由 `sys_config.gift_membership_threshold` 动态填入 |
|
|
|
+| `remaining` | Integer | 还差多少达标(分)= `max(0, threshold - accumulatedAmount)`,已达标为 `0` |
|
|
|
|
|
|
-> **注意**:`threshold` 为 `@TableField(exist = false)` 非数据库列,仅接口返回用。
|
|
|
+> **注意**:`threshold`、`remaining` 为 `@TableField(exist = false)` 非数据库列,仅接口返回用。
|
|
|
+> **无家庭时**:接口返回空对象,`threshold`/`remaining`/`accumulatedAmount` 均为 `null`(此时不存在赠会员累计口径),前端据此隐藏进度条。
|
|
|
> 阈值单位为分(1980 元 = 198000 分),实际生效值以 `sys_config` 表中 `gift_membership_threshold` 为准(`insertSysConfigSeed` 仅在缺失时插入,不覆盖已有配置)。
|
|
|
|
|
|
---
|
|
|
|
|
|
-*文档最后更新:2026-09-13*
|
|
|
+*文档最后更新:2026-09-29*
|