整理新增的几个文件策略表sql,以及admin角色添加菜单权限

This commit is contained in:
段冬梅
2019-05-23 14:45:36 +08:00
parent cf29b7ec04
commit 25c2bb790e
2 changed files with 49 additions and 12 deletions

View File

@@ -7,13 +7,15 @@ INSERT INTO sys_menu (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`,
INSERT INTO sys_menu (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1121, '0,1,86,717,1121,', 'traffic_mirror_address', '流量转发目的地址', 8, '/proxy/fileTrafficMirror/list', '', '', 1, 'proxy:fileTrafficMirror:config', '1', '2019-05-09 16:03:58', '1', '2019-05-09 16:03:58', '', 1, NULL, 0, 0, 515);
INSERT INTO sys_menu (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1122, '0,1,150,750,1122,', 'traffic_mirror_address', '流量转发目的地址', 426, '/proxy/fileTrafficMirror/list', '', '', 1, 'proxy:fileTrafficMirror:confirm', '1', '2019-05-09 16:06:17', '1', '2019-05-09 16:06:17', '', 1, NULL, 0, 0, 515);
INSERT INTO sys_menu (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1123, '0,1,151,865,1123,', 'traffic_mirror_address', '流量转发目的地址', 39, '/proxy/fileTrafficMirror/list', '', '', 1, 'proxy:fileTrafficMirror:audit', '1', '2019-05-09 16:07:13', '1', '2019-05-09 16:07:13', '', 1, NULL, 0, 0, 515);
#打开文件策略模块---->新加了阻断文件访问界面,无需打开此菜单
#update sys_menu set is_show=1,del_flag=1 where code='file_strategy';
INSERT INTO sys_menu (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1121, '0,1,86,717,1121,', 'visit_response_page', '访问阻断页面', 10, '/proxy/fileResponsePage/list', '', '', 1, 'proxy:fileResponsePage:config', '1', '2019-05-09 11:16:20', '1', '2019-05-09 11:16:20', '', 1, NULL, 0, 0, 516);
INSERT INTO sys_menu (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1122, '0,1,150,750,1122,', 'visit_response_page', '访问阻断页面', 428, '/proxy/fileResponsePage/list', '', '', 1, 'proxy:fileResponsePage:confirm', '1', '2019-05-09 14:58:10', '1', '2019-05-09 14:58:10', '', 1, NULL, 0, 0, 516);
INSERT INTO sys_menu (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (1123, '0,1,151,865,1123,', 'visit_response_page', '访问阻断页面', 41, '/proxy/fileResponsePage/list', '', '', 1, 'proxy:fileResponsePage:audit', '1', '2019-05-09 14:59:54', '1', '2019-05-09 14:59:54', '', 1, NULL, 0, 0, 516);
INSERT INTO function_service_dict (`function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES (513, 0, 1, 'monit', 643, 'hijack_file_strategy', '', 1, NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', 0, 1, '');
INSERT INTO function_service_dict (`function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES (514, 0, 1, 'monit', 644, 'file_insert_script', '', 1, NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', 0, 1, '');
INSERT INTO function_service_dict (`function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES (515, 0, 1, 'monit', 645, 'file_traffic_mirror', NULL, 1, NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', NULL, 0, 1, NULL);
INSERT INTO function_service_dict (`function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES (512, 0, 1, 'monit', 608, 'file_strategy', NULL, 1, NULL, '2019-05-17 11:46:48', NULL, '2019-05-17 11:46:51', NULL, 0, 1, NULL);
INSERT INTO function_service_dict (`function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES (512, 0, 1, 'monit', 608, 'file_strategy', NULL, 0, NULL, '2019-05-17 11:46:48', NULL, '2019-05-17 11:46:51', NULL, 0, 1, NULL);
INSERT INTO function_service_dict (`function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES (516, 0, 1, 'monit', 646, 'visit_response_page', NULL, 1, NULL, '2019-05-17 11:46:48', NULL, '2019-05-17 11:46:51', NULL, 0, 1, NULL);
ALTER TABLE proxy_file_strategy_cfg ADD cancel_request_id INT(11) NULL COMMENT '取消审核来函';
@@ -121,5 +123,48 @@ CREATE TABLE `pxy_profile_traffic_mirror` (
SET FOREIGN_KEY_CHECKS = 1;
#访问阻断界面
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for pxy_profile_response_pages
-- ----------------------------
DROP TABLE IF EXISTS `pxy_profile_response_pages`;
CREATE TABLE `pxy_profile_response_pages` (
`cfg_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
`cfg_desc` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`cfg_type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`action` int(11) NULL DEFAULT NULL,
`is_valid` int(11) NOT NULL COMMENT '0无效1有效-1删除;1 未审核时配置可删除;2 审核通过此字段置1;3 取消审核通过此字段置0',
`is_audit` int(11) NOT NULL COMMENT '0未审核1审核通过2审核未通过3取消审核通过;1 审核未通过,配置可修改;2 审核通过,配置不可删除,只能取消审核通过',
`creator_id` int(11) NOT NULL COMMENT '取自sys_user.id',
`create_time` datetime(0) NULL DEFAULT NULL,
`editor_id` int(11) NULL DEFAULT NULL COMMENT '取自sys_user.id',
`edit_time` datetime(0) NULL DEFAULT NULL,
`auditor_id` int(11) NULL DEFAULT NULL COMMENT '取自sys_user.id',
`audit_time` datetime(0) NULL DEFAULT NULL,
`service_id` int(11) NOT NULL COMMENT '参考系统业务类型管理表',
`request_id` int(11) NOT NULL COMMENT '取自request_info.id',
`compile_id` int(11) NULL DEFAULT NULL COMMENT '取自服务接口返回的maat配置的编译id配置初始入库时获取。',
`is_area_effective` int(11) NOT NULL COMMENT '0否1是',
`classify` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分类id多个用英文逗号分隔',
`attribute` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性质id多个用英文逗号分隔',
`lable` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签id,多个用英文逗号分隔',
`area_effective_ids` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '多个英文逗号分隔',
`function_id` int(11) NOT NULL,
`cfg_region_code` int(11) NULL DEFAULT NULL,
`file_desc` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件名称',
`url` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件保存的url',
`content_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容类型如text/html取字典表contentType',
`content_length` int(11) NOT NULL DEFAULT 0 COMMENT '文件长度',
`md5` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件md5值',
`cancel_request_id` int(11) NULL DEFAULT NULL COMMENT '取消审核来函',
PRIMARY KEY (`cfg_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 49 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;
#为admin角色分配新的菜单权限
insert into sys_privilege (PRIVILEGE_MASTER,PRIVILEGE_MASTER_VALUE,PRIVILEGE_ACCESS,PRIVILEGE_ACCESS_VALUE,PRIVILEGE_OPERATION ) select 'ROLE',r.id,1000,m.id,1 from sys_role r,sys_menu m where r.name='admin' and m.code in ('hijack_file_strategy','file_insert_script','traffic_mirror_address');
insert into sys_privilege (PRIVILEGE_MASTER,PRIVILEGE_MASTER_VALUE,PRIVILEGE_ACCESS,PRIVILEGE_ACCESS_VALUE,PRIVILEGE_OPERATION ) select 'ROLE',r.id,1000,m.id,1 from sys_role r,sys_menu m where r.name='admin' and m.code in ('hijack_file_strategy','file_insert_script','traffic_mirror_address','visit_response_page');

View File

@@ -1,8 +0,0 @@
#访问阻断页面业务表和菜单表
INSERT INTO function_service_dict (`function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`)
VALUES (516, 0, 1, 'monit', 646, 'visit_response_page', NULL, 1, NULL, '2019-05-17 11:46:48', NULL, '2019-05-17 11:46:51', NULL, 0, 1, NULL);
INSERT INTO sys_menu (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`)
VALUES (1121, '0,1,86,717,1121,', 'visit_response_page', '访问阻断页面', 10, '/proxy/fileResponsePage/list', '', '', 1, 'proxy:fileResponsePage:config', '1', '2019-05-09 11:16:20', '1', '2019-05-09 11:16:20', '', 1, NULL, 0, 0, 516),
(1122, '0,1,150,750,1122,', 'visit_response_page', '访问阻断页面', 428, '/proxy/fileResponsePage/list', '', '', 1, 'proxy:fileResponsePage:confirm', '1', '2019-05-09 14:58:10', '1', '2019-05-09 14:58:10', '', 1, NULL, 0, 0, 516),
(1123, '0,1,151,865,1123,', 'visit_response_page', '访问阻断页面', 41, '/proxy/fileResponsePage/list', '', '', 1, 'proxy:fileResponsePage:audit', '1', '2019-05-09 14:59:54', '1', '2019-05-09 14:59:54', '', 1, NULL, 0, 0, 516);