|
@@ -1276,7 +1276,8 @@ CREATE TABLE `b_role_privilege`
|
|
|
UNIQUE KEY `IDX_ROLE_PRIVILEGE_01`(`school_id`,`role_code`, `privilege_code`)
|
|
|
) ENGINE = InnoDB
|
|
|
DEFAULT CHARSET = utf8mb4 COMMENT ='角色权限关联表';
|
|
|
-
|
|
|
+
|
|
|
+LOCK TABLES `b_privilege` WRITE;
|
|
|
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`,`icon`,`i18n`)
|
|
|
VALUES ('user_list', '用户管理', 'root_code', 'MENU', '/admin/user/list', 10,1,'icon-user','index.user');
|
|
|
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`,`icon`,`i18n`)
|
|
@@ -1351,76 +1352,5 @@ INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `pr
|
|
|
VALUES ('exam_check_answer', '数据检查', 'root_code', 'MENU', '/admin/exam/check/answer', 130,1,'icon-check','index.check');
|
|
|
INSERT INTO `b_privilege` ( `code`, `name`, `parent_code`, `privilege_type`, `privilege_uri`, `seq`,`level`,`icon`,`i18n`)
|
|
|
VALUES ('operation_log', '操作日志', 'root_code', 'MENU', '/admin/operation/log', 140,1,'icon-tasks','index.log');
|
|
|
+UNLOCK TABLES;
|
|
|
|
|
|
-INSERT INTO b_role_privilege (`school_id`, `role_code`, `privilege_code`,`enable`)
|
|
|
-SELECT s.id,'SCHOOL_ADMIN',p.`code`,1 from b_privilege p join b_school s;
|
|
|
-
|
|
|
-INSERT INTO b_role_privilege (`school_id`, `role_code`, `privilege_code`,`enable`)
|
|
|
-SELECT s.id,'SUBJECT_HEADER',p.`code`,1 from b_privilege p join b_school s
|
|
|
-where p.`code` in('exam_mark','exam_mark-mark','exam_mark-group','exam_mark-marker','exam_mark-trial','exam_mark-library'
|
|
|
-,'exam_mark-library-inspect','exam_mark-library-reject','exam_mark-arbitrate','exam_mark-quality','exam_reject_list'
|
|
|
-,'exam_reject_list-paper','exam_reject_list-history','exam_problem_history','exam_problem_history-reset'
|
|
|
-,'exam_problem_history-batch_reset'
|
|
|
-,'exam_inspected_info','exam_inspected_info-info','exam_inspected_info-list','exam_inspected_info-next_round'
|
|
|
-,'exam_score','exam_report_subject','exam_report_subject_range');
|
|
|
-
|
|
|
-INSERT INTO b_role_privilege (`school_id`, `role_code`, `privilege_code`,`enable`)
|
|
|
-SELECT s.id,'COLLEGE_ADMIN',p.`code`,1 from b_privilege p join b_school s
|
|
|
-where p.`code` in('exam_mark','exam_mark-mark','exam_mark-group','exam_mark-marker','exam_mark-trial','exam_mark-library'
|
|
|
-,'exam_mark-library-inspect','exam_mark-library-reject','exam_mark-arbitrate','exam_mark-quality','exam_reject_list'
|
|
|
-,'exam_reject_list-paper','exam_reject_list-history','exam_problem_history','exam_problem_history-reset'
|
|
|
-,'exam_problem_history-batch_reset'
|
|
|
-,'exam_inspected_info','exam_inspected_info-info','exam_inspected_info-list','exam_inspected_info-next_round'
|
|
|
-,'exam_score','exam_report_subject','exam_report_subject_range');
|
|
|
-
|
|
|
-INSERT INTO b_role_privilege (`school_id`, `role_code`, `privilege_code`,`enable`)
|
|
|
-SELECT s.id,'INSPECTOR',p.`code`,1 from b_privilege p join b_school s
|
|
|
-where p.`code` in('exam_inspected_info','exam_inspected_info-info','exam_inspected_info-list','exam_inspected_info-next_round');
|
|
|
-
|
|
|
-INSERT INTO b_role_privilege (`school_id`, `role_code`, `privilege_code`,`enable`)
|
|
|
-SELECT s.id,'SCHOOL_VIEWER',p.`code`,1 from b_privilege p join b_school s
|
|
|
-where p.`code` in('exam_score','exam_report_subject','operation_log');
|
|
|
-
|
|
|
-DROP TABLE IF EXISTS `b_role_info`;
|
|
|
-CREATE TABLE `b_role_info`
|
|
|
-(
|
|
|
- `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
|
|
- `school_id` int(11) NOT NULL COMMENT '学校ID',
|
|
|
- `code` varchar(64) NOT NULL COMMENT '角色CODE',
|
|
|
- `name` varchar(64) NOT NULL COMMENT '名称',
|
|
|
- `seq` int(11) NOT NULL COMMENT '排序',
|
|
|
- `updater_id` int(11) DEFAULT NULL COMMENT '更新人ID',
|
|
|
- `update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
|
|
- PRIMARY KEY (`id`),
|
|
|
- UNIQUE KEY `IDX_ROLE_INFO_01` (`school_id`,`code`)
|
|
|
-) ENGINE = InnoDB
|
|
|
- DEFAULT CHARSET = utf8mb4 COMMENT ='角色表';
|
|
|
-
|
|
|
-DROP TABLE IF EXISTS `b_role_temp`;
|
|
|
-CREATE TABLE `b_role_temp`
|
|
|
-(
|
|
|
- `id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
- `code` varchar(50) NOT NULL,
|
|
|
- `name` varchar(50) NOT NULL,
|
|
|
- `seq` int(11) NOT NULL,
|
|
|
- PRIMARY KEY (`id`),
|
|
|
- UNIQUE KEY `IDX_ROLE_TEMP_01` (`code`)
|
|
|
-) ENGINE = InnoDB
|
|
|
- DEFAULT CHARSET = utf8mb4
|
|
|
- COLLATE = utf8mb4_bin;
|
|
|
-INSERT INTO `b_role_temp` (`code`, `name`, `seq`) VALUES ('SYS_ADMIN', '系统管理员', 1);
|
|
|
-INSERT INTO `b_role_temp` (`code`, `name`, `seq`) VALUES ('SCHOOL_ADMIN', '学校管理员', 2);
|
|
|
-INSERT INTO `b_role_temp` (`code`, `name`, `seq`) VALUES ('SCANNER', '扫描员', 3);
|
|
|
-INSERT INTO `b_role_temp` (`code`, `name`, `seq`) VALUES ('SUBJECT_HEADER', '科组长', 4);
|
|
|
-INSERT INTO `b_role_temp` (`code`, `name`, `seq`) VALUES ('MARKER', '评卷员', 5);
|
|
|
-INSERT INTO `b_role_temp` (`code`, `name`, `seq`) VALUES ('SCHOOL_VIEWER', '学校查询员', 6);
|
|
|
-INSERT INTO `b_role_temp` (`code`, `name`, `seq`) VALUES ('SCHOOL_DEV', '学校接口调用', 7);
|
|
|
-INSERT INTO `b_role_temp` (`code`, `name`, `seq`) VALUES ('INSPECTOR', '复核员', 8);
|
|
|
-INSERT INTO `b_role_temp` (`code`, `name`, `seq`) VALUES ('SCAN_ADMIN', '扫描管理员', 9);
|
|
|
-INSERT INTO `b_role_temp` (`code`, `name`, `seq`) VALUES ('COLLEGE_ADMIN', '学院管理员', 10);
|
|
|
-
|
|
|
-
|
|
|
-INSERT INTO `b_role_info` (`school_id`,`code`, `name`, `seq`)
|
|
|
-SELECT s.id,p.`code`,p.name,p.seq from b_role_temp p join b_school s;
|
|
|
-
|
|
|
-DROP TABLE IF EXISTS `b_role_temp`;
|