二期内容提交
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
-- 二期库位管理菜单和按钮权限。
|
||||
-- 在 phase1-admin-rbac.sql、phase1-platform-master-data-and-permission-management.sql 之后执行,可重复执行。
|
||||
USE baiyue_iam;
|
||||
SET NAMES utf8mb4;
|
||||
|
||||
INSERT INTO iam_permission
|
||||
(id, tenant_id, app_code, permission_type, parent_id, permission_code, permission_name,
|
||||
route_path, http_method, sort_no, status, built_in, deleted)
|
||||
VALUES
|
||||
(5103040, 0, 'PLATFORM', 'MENU', 5103000, 'platform:location:list', '库位管理',
|
||||
'/master-data/locations', NULL, 40, 'ACTIVE', 1, 0),
|
||||
(5103041, 0, 'PLATFORM', 'BUTTON', 5103040, 'platform:location:create', '新增库位',
|
||||
NULL, NULL, 10, 'ACTIVE', 1, 0),
|
||||
(5103042, 0, 'PLATFORM', 'BUTTON', 5103040, 'platform:location:edit', '编辑库位',
|
||||
NULL, NULL, 20, 'ACTIVE', 1, 0),
|
||||
(5103043, 0, 'PLATFORM', 'BUTTON', 5103040, 'platform:location:status', '启停库位',
|
||||
NULL, NULL, 30, 'ACTIVE', 1, 0),
|
||||
(5103044, 0, 'PLATFORM', 'BUTTON', 5103040, 'platform:location:delete', '删除库位',
|
||||
NULL, NULL, 40, 'ACTIVE', 1, 0)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
permission_type = VALUES(permission_type), parent_id = VALUES(parent_id),
|
||||
permission_name = VALUES(permission_name), route_path = VALUES(route_path),
|
||||
sort_no = VALUES(sort_no), status = 'ACTIVE', built_in = 1, deleted = 0;
|
||||
|
||||
-- 二期新增库位权限默认只授予平台系统管理员。
|
||||
INSERT INTO iam_role_permission (role_id, permission_id, tenant_id)
|
||||
SELECT 4000001, id, 0
|
||||
FROM iam_permission
|
||||
WHERE tenant_id = 0 AND app_code = 'PLATFORM'
|
||||
AND permission_code IN (
|
||||
'platform:location:list', 'platform:location:create', 'platform:location:edit',
|
||||
'platform:location:status', 'platform:location:delete'
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE tenant_id = VALUES(tenant_id);
|
||||
Reference in New Issue
Block a user