From 306a5143163266df67baded64ab9e2fd7fb0cbc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=BF=E4=BA=91=E7=A7=8B=E6=9C=88?= <15273589815@163.com> Date: Fri, 11 Sep 2026 22:28:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E7=99=BB=E5=BD=95=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E5=8F=B0=E7=9A=84=E6=8E=A2=E9=92=88=EF=BC=9A=E6=8A=95?= =?UTF-8?q?=E9=A1=BE=E9=82=A3=E4=B8=AA=E6=8C=89=E9=92=AE=E5=85=B6=E5=AE=9E?= =?UTF-8?q?=E8=AF=A5=E6=98=AF=E5=AE=A2=E6=88=B7=E8=A7=86=E8=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /api/v1/advisor/recommendations/published 的语义是"**我(客户)自己**已发布的方案" —— 服务端按 `customer_id == 调用者 user_id` 过滤(权限码 `product-recommendation:read:self` 的 `:self` 正对应这一点),所以**投顾调它必然为空**:筛的是 customer_id = 投顾自己的 id。 把它标成 customer 角色,免得再用投顾账号点它、然后怀疑权限。 查证过程中确认了三处数据空缺(投顾合并后那 21 张 advisor_* 表是新建的): - client_facing_content = 0 行(没有任何投顾方案) - sys_customer_assignment = 0 行(投顾没绑定任何客户,故 customer_ids 为空) - fin_risk_assessment 里没有 9001(客户画像的前置"完成开户风险测评问卷"未满足) --- tools/login_console.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/login_console.py b/tools/login_console.py index 62073d2..9ec0621 100644 --- a/tools/login_console.py +++ b/tools/login_console.py @@ -152,8 +152,11 @@ function renderProbes(roles, userId) { { label: '角色清单', path: '/api/v1/admin/roles', role: 'admin' }, { label: '我的身份(管理视角)', path: `/api/v1/admin/users/${userId}/roles`, role: 'admin' }, - { label: '已发布投顾方案', path: '/api/v1/advisor/recommendations/published', - role: 'advisor' }, + // ⚠️ 这个接口的语义是"**我(客户)自己**已发布的方案":服务端按 + // `customer_id == 调用者 user_id` 过滤(权限码 `product-recommendation:read:self` + // 的 `:self` 正对应这一点),所以**投顾调它必然为空**。标成 customer 才不会被误用。 + { label: '我已发布的投顾方案(客户视角)', + path: '/api/v1/advisor/recommendations/published', role: 'customer' }, ]; const box = document.getElementById('probes'); box.innerHTML = '';