From ceb6bbbe4ce41a955a7b6c22c03ccb21b7eba1ab Mon Sep 17 00:00:00 2001 From: API Changelog Bot Date: Mon, 27 Apr 2026 17:48:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(admin-insurance):=20=E4=BF=9D=E9=99=A9?= =?UTF-8?q?=E4=BA=A7=E5=93=81=E5=88=97=E8=A1=A8=20isOverseas=20=E7=AD=9B?= =?UTF-8?q?=E9=80=89=E7=94=9F=E6=95=88=20(HL=20#1491)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../27_fix_admin-insurance_overseas-filter.md | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 changelogs/2026-04/27_fix_admin-insurance_overseas-filter.md diff --git a/changelogs/2026-04/27_fix_admin-insurance_overseas-filter.md b/changelogs/2026-04/27_fix_admin-insurance_overseas-filter.md new file mode 100644 index 0000000..589faa9 --- /dev/null +++ b/changelogs/2026-04/27_fix_admin-insurance_overseas-filter.md @@ -0,0 +1,47 @@ +# admin 保险产品列表 isOverseas 筛选生效(境外/境内分类不再失效) + +**日期**: 2026-04-27 +**PR**: #1491 (Closes #1490) +**影响端**: 管理后台 admin + +## 行为变化 + +`GET /admin/insurance/products?isOverseas=true|false` 现在真的会按 `isOverseas` 字段过滤,之前接口参数声明了但后端**完全忽略**,导致前端任何选择都返回全量。 + +接口签名无变化,只是「之前空跑、现在生效」。 + +## 涉及接口 + +- `GET /admin/insurance/products?page&pageSize&isOverseas` — 查询参数 `isOverseas` 现在生效 + +## 验收实证(测试服 2026-04-27 部署后) + +``` +# 全量 +GET /admin/insurance/products?page=1&pageSize=20 +→ 境内 + 境外都返回 + +# 仅境外 +GET /admin/insurance/products?page=1&pageSize=20&isOverseas=true +→ 仅 isOverseas=true 的产品 + +# 仅境内 +GET /admin/insurance/products?page=1&pageSize=20&isOverseas=false +→ 仅 isOverseas=false 的产品 +``` + +## 为什么改这个 + +蒋雨莲(运营)反馈:保险产品列表的「产品类型」下拉切到「境外」后列表无变化、依旧境内境外都有。 + +排查发现 `AdminInsuranceController.listProducts()` 接收了 `@RequestParam Boolean isOverseas` 但调 Service 时根本没传下去,Service / Mapper 链路全是无参的 —— 经典「哑参数 BUG」。 + +后端补全参数透传,并在 Mapper 用 `eqIfPresent`(null 不拼条件,保持向后兼容)。 + +## 前端建议 + +**前端无需改动**。保险产品列表页的「产品类型」筛选 / `searchForm.isOverseas` / `/api/insurance.js` 都已经在传 `isOverseas`,本次后端补完链路后下拉切换会立即看到列表条数变化。 + +## mp 端 / C 端 + +不影响(保险产品列表是后台管理功能,不暴露给小程序)。