From f0863e0267651cf9cf695b6e5b2adb17eb0c10ea Mon Sep 17 00:00:00 2001 From: API Changelog Bot Date: Mon, 20 Apr 2026 17:18:36 +0800 Subject: [PATCH] =?UTF-8?q?mp=20=E7=8F=AD=E6=9C=9F=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E8=BF=87=E6=9C=9F=20+=20=E5=87=BA=E5=8F=91?= =?UTF-8?q?=E5=89=8D1=E5=A4=A9=E8=87=AA=E5=8A=A8=E6=8A=A5=E5=90=8D?= =?UTF-8?q?=E7=BB=93=E6=9D=9F=EF=BC=88PR=20#999=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2026-04-20_mp-schedules-filter-expired.md | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 changelogs/2026-04/2026-04-20_mp-schedules-filter-expired.md diff --git a/changelogs/2026-04/2026-04-20_mp-schedules-filter-expired.md b/changelogs/2026-04/2026-04-20_mp-schedules-filter-expired.md new file mode 100644 index 0000000..e0808bb --- /dev/null +++ b/changelogs/2026-04/2026-04-20_mp-schedules-filter-expired.md @@ -0,0 +1,25 @@ +# mp 班期接口过滤过期 + 出发前 1 天自动报名结束 + +**日期**: 2026-04-20 +**PR**: #999 +**接口**: `GET /mp/product/{id}/schedules` + +## 改动 + +1. **过滤过期班期**:响应中不再包含 `departureDate < 今天` 的班期 +2. **出发前 1 天自动报名结束**:保留班期中,若 `departureDate <= today + 1 天`(含当天和前一天),后端将 `batchStatus` 覆盖为 `"FINISHED"` + +## 业务语义 +- 出发前 1 天停止报名(行业通用规则) +- 避免前端展示已发团或即将发团(<1天)的班期为"可报名"状态 + +## 验证 +测试产品 `2044306857534636034`: +- DB 有 6 条班期(含 1 条 `2026-04-19` 已过期) +- 接口返 5 条,过期班期已过滤 +- 其余班期 `departureDate=2026-07-xx` 距今 74+ 天,保持原状态 `ENROLLING` + +## 前端注意 +- 不再需要自己在列表上按 departureDate 过滤 +- 判断"是否可报名"继续用 `batchStatus === 'ENROLLING'`(或 NEARLY_FULL),**无需再判日期** +- 5 分钟 Redis 缓存,部署后按 TTL 自然过期