Files
tms-erp-api/doc/sql/update/add-mp-auth-permission.sql
T
2026-09-18 16:31:37 +08:00

22 lines
1.3 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 小程序调度端入口权限码 mp_auth
-- user-info 的 permission 来自按钮叶子 code;需把本菜单授权给调度/管理员角色
-- 执行后:后台「角色管理 → 权限配置」勾选「小程序调度端」,或按需 INSERT blade_role_menu
-- 父级菜单(小程序)
INSERT IGNORE INTO `blade_menu`
(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `component`, `remark`, `is_deleted`)
VALUES
(2091800000000000001, 0, 'miniprogram', '小程序', 'menu', '/miniprogram', 'iconfont iconicon_work', 98, 1, 0, 1, '', '小程序相关权限', 0);
-- 按钮权限:mp_auth(叶子节点,会被 permissionCodes 收集)
INSERT IGNORE INTO `blade_menu`
(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `component`, `remark`, `is_deleted`)
VALUES
(2091800000000000002, 2091800000000000001, 'mp_auth', '小程序调度端', 'mp_auth', '', '', 1, 2, 0, 1, NULL, '登录后进入调度端首页', 0);
-- 示例:给管理员角色(role_id 按环境实际调整,默认管理员 1123598816738675201
-- INSERT IGNORE INTO `blade_role_menu` (`id`, `menu_id`, `role_id`)
-- VALUES
-- (2091800000000000101, 2091800000000000001, 1123598816738675201),
-- (2091800000000000102, 2091800000000000002, 1123598816738675201);