blob: 8db1d2c03622fdc86fccb76a6477b6ed73bbad25 [file] [log] [blame]
刘洪青f457fbd2020-09-10 11:26:12 +08001-- 10.1.init-message.sql
2
3
4/*
5将 paas.example.com 替换为 paas.学校域名.edu.cn
6*/
7
8-- 以下脚本为可选操作
9
10/*
11 * 若部署了流程平台、门户的产品
12 * 可初始化云平台下的相关菜单数据
13 */
14
15use admin_center;
16
17-- message
18-- 如果部署,流程平台,请处理
19
20
21insert into TB_MGT_ROLE (ID, DELETED, CODE, NAME, MEMO, STATUS)
22values ('80', 0, 'message-admin', '消息平台管理员', '', '1');
23insert into TB_MGT_ROLE (ID, DELETED, CODE, NAME, MEMO, STATUS)
24values ('81', 0, 'message-opt', '消息平台操作员', '', '1');
25
26commit;
27
28
29/*
30消息服务 message-backstage
31名称 路由 图标
32消息网关管理 /message-backstage/msgGateWay su-icon-xiaoxiwangguan
33短信模板管理 /message-backstage/SMSTemplateManage su-icon-mobanguanli
34消息类别管理 /message-backstage/msgTypes su-icon-xiaoxileibie
35消息任务监控 /message-backstage/msgTaskMonitor su-icon-renwujiankong
36消息日志审计 /message-backstage/msgLogAudit su-icon-details
37应用管理 /message-backstage/msgSoftManage su-icon-sort
38敏感词管理 /message-backstage/SensitiveWords su-icon-lock-w
39设置 /message-backstage/msgSendCondition su-icon-print
40*/
41
42update TB_MGT_PERMISSION
43 set LFT = LFT+18
44where LFT>=92
45;
46
47update TB_MGT_PERMISSION
48 set RGT = RGT+18
49where RGT>=92
50;
51
52
53insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT)
54values ('80000', 0, 'message-backstage', '消息服务', '1', '2', '', '/', '1', '1', 80000, 1, 92, 109);
55
56insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT)
刘洪青66a3fe22021-01-29 23:02:37 +080057values ('80100', 0, 'msgGateWay', '消息网关管理', '1', '2', 'su-icon-xiaoxiwangguan', '/message-backstage/msgGateWay', '1', '80000', 80100, 2, 93, 94);
刘洪青f457fbd2020-09-10 11:26:12 +080058insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT)
刘洪青66a3fe22021-01-29 23:02:37 +080059values ('80200', 0, 'SMSTemplateManage', '短信模板管理', '1', '2', 'su-icon-mobanguanli', '/message-backstage/SMSTemplateManage', '1', '80000', 80200, 2, 95, 96);
刘洪青f457fbd2020-09-10 11:26:12 +080060insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT)
刘洪青66a3fe22021-01-29 23:02:37 +080061values ('80300', 0, 'msgTypes', '消息类别管理', '1', '2', 'su-icon-xiaoxileibie', '/message-backstage/msgTypes', '1', '80000', 80300, 2, 97, 98);
刘洪青f457fbd2020-09-10 11:26:12 +080062insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT)
刘洪青66a3fe22021-01-29 23:02:37 +080063values ('80400', 0, 'msgTaskMonitor', '消息任务监控', '1', '2', 'su-icon-renwujiankong', '/message-backstage/msgTaskMonitor', '1', '80000', 80400, 2, 99, 100);
刘洪青f457fbd2020-09-10 11:26:12 +080064insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT)
刘洪青66a3fe22021-01-29 23:02:37 +080065values ('80500', 0, 'msgLogAudit', '消息日志审计', '1', '2', 'su-icon-details', '/message-backstage/msgLogAudit', '1', '80000', 80500, 2, 101, 102);
刘洪青f457fbd2020-09-10 11:26:12 +080066
67insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT)
刘洪青66a3fe22021-01-29 23:02:37 +080068values ('80600', 0, 'msgSoftManage', '应用管理', '1', '2', 'su-icon-sort', '/message-backstage/msgSoftManage', '1', '80000', 80600, 2, 103, 104);
刘洪青f457fbd2020-09-10 11:26:12 +080069insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT)
刘洪青66a3fe22021-01-29 23:02:37 +080070values ('80700', 0, 'SensitiveWords', '敏感词管理', '1', '2', 'su-icon-lock-w', '/message-backstage/SensitiveWords', '1', '80000', 80700, 2, 105, 106);
刘洪青f457fbd2020-09-10 11:26:12 +080071insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT)
刘洪青66a3fe22021-01-29 23:02:37 +080072values ('80800', 0, 'msgSendCondition', '设置', '1', '2', 'su-icon-print', '/message-backstage/msgSendCondition', '1', '80000', 80800, 2, 107, 108);
刘洪青f457fbd2020-09-10 11:26:12 +080073
74commit;
75
76
77insert into TB_MGT_ROLE_PERMISSION (ID, DELETED, ROLE_ID, PERMISSION_ID)
78
79select CONCAT('1_', ID) as ID, 0 as DELETED, '1' as ROLE_ID, ID as PERMISSION_ID
80from TB_MGT_PERMISSION
81where (ID like '8____' or ID='1')
82 and CONCAT('1_', ID) not in (select ID from TB_MGT_ROLE_PERMISSION)
83;
84
85insert into TB_MGT_ROLE_PERMISSION (ID, DELETED, ROLE_ID, PERMISSION_ID)
86
87select CONCAT('80_', ID) as ID, 0 as DELETED, '50' as ROLE_ID, ID as PERMISSION_ID
88from TB_MGT_PERMISSION
89where (ID like '8____' or ID='1')
90 and CONCAT('80_', ID) not in (select ID from TB_MGT_ROLE_PERMISSION)
91;
92
93commit;
94
95
96-- 更新 admin-platform 下菜单的访问域
97
98update TB_MGT_PERMISSION
99set
100 ORIGIN='http://admin-platform.paas.example.com'
101where LFT >= 92
102 and RGT <= 109
103;
104
105commit;