From baf16d49b9a5585c1cc1eba9d2a9cd36b2147c8e Mon Sep 17 00:00:00 2001 From: wuzilong <704541015@qq.com> Date: Mon, 2 Nov 2026 09:53:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(pl):=20=E6=8C=89=E6=9D=83=E9=99=90=E5=92=8C?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E5=AE=9A=E4=BD=8D=E8=AE=A1=E5=88=92=E7=94=A8?= =?UTF-8?q?=E8=AF=81=E8=8F=9C=E5=8D=95=EF=BC=8C=E5=85=BC=E5=AE=B9=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E5=BA=93=E5=B7=B2=E6=9C=89=E8=8F=9C=E5=8D=95=E8=BA=AB?= =?UTF-8?q?=E4=BB=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/sql/migrations/2026-11-01-pl-stop-cert-views.sql | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/sql/migrations/2026-11-01-pl-stop-cert-views.sql b/docs/sql/migrations/2026-11-01-pl-stop-cert-views.sql index 615fb34dc..f3c50e1cf 100644 --- a/docs/sql/migrations/2026-11-01-pl-stop-cert-views.sql +++ b/docs/sql/migrations/2026-11-01-pl-stop-cert-views.sql @@ -20,17 +20,20 @@ WHERE parent.id='PL_MENU_ROOT' AND parent.del_flag=0 AND parent.tenant_no='shanx AND NOT EXISTS (SELECT 1 FROM sys_menu existing WHERE existing.id=target.id OR (existing.tenant_no=parent.tenant_no AND existing.path=target.path)); +-- 计划用证菜单在不同环境使用不同 ID,按权限与路由定位并保留原身份。 UPDATE sys_menu leaf JOIN sys_menu parent ON parent.id='PL_MENU_ROOT' AND parent.tenant_no=leaf.tenant_no AND parent.del_flag=0 JOIN sys_menu root ON root.id=parent.parent_id AND root.tenant_no=parent.tenant_no AND root.del_flag=0 LEFT JOIN sys_menu folder ON folder.id=leaf.parent_id AND folder.id='PL_GROUP_CERT' AND folder.parent_id=parent.id AND folder.tenant_no=leaf.tenant_no AND folder.del_flag=0 -SET leaf.menu_name=CASE leaf.id WHEN 'PL_QUOTA_CERT' THEN '证件建档' - WHEN 'PL00000000000000000000000000015' THEN '计划段次用证' ELSE '合法使用证明' END, - leaf.order_num=CASE leaf.id WHEN 'PL_QUOTA_CERT' THEN 1 WHEN 'PL00000000000000000000000000015' THEN 4 ELSE 5 END, +SET leaf.menu_name=CASE WHEN leaf.id='PL_QUOTA_CERT' THEN '证件建档' + WHEN leaf.perms='pl:plan-cert:list' AND leaf.path='plan-cert' THEN '计划段次用证' ELSE '合法使用证明' END, + leaf.order_num=CASE WHEN leaf.id='PL_QUOTA_CERT' THEN 1 + WHEN leaf.perms='pl:plan-cert:list' AND leaf.path='plan-cert' THEN 4 ELSE 5 END, leaf.update_time=NOW() WHERE leaf.tenant_no='shanxia2.0' AND leaf.del_flag=0 AND root.path='/web' AND root.parent_id='0' AND (leaf.parent_id=parent.id OR folder.id IS NOT NULL) - AND leaf.id IN ('PL_QUOTA_CERT','PL00000000000000000000000000015','PL_LEGAL_USE_DOCUMENT'); + AND (leaf.id IN ('PL_QUOTA_CERT','PL_LEGAL_USE_DOCUMENT') + OR (leaf.perms='pl:plan-cert:list' AND leaf.path='plan-cert')); COMMIT;