# 菜单
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 ('717', '0,1,86,717,', 'ip_group_configuration', 'IP公共组管理', '340', '/basics/ip/list', '', '', '1', 'ip:common:config', '1', '2019-05-27 14:06:23', '1', '2019-05-27 14:37:33', '', '1', NULL, '0', '0', '605');
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 ('717', '0,1,86,717,', 'url_group_configuration', 'URL公共组管理', '350', '/basics/url/list', '', '', '1', 'url:common:config', '1', '2019-05-27 15:54:43', '1', '2019-05-27 15:55:05', '', '1', NULL, '0', '0', '606');
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 ('717', '0,1,86,717,', 'domain_group_configuration', '域名公共组管理', '360', '/basics/domain/list', '', '', '1', 'domain:common:config', '1', '2019-06-06 15:18:43', '1', '2019-06-06 15:18:43', '', '1', NULL, '0', '0', '607');
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 ('717', '0,1,86,717,', 'scriberid_group_configuration', '账号公共组管理', '370', '/basics/scriberId/list', '', '', '1', 'scriberid:common:config', '1', '2019-06-06 15:20:51', '1', '2019-06-06 15:20:51', '', '1', NULL, '0', '0', '608');

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 ('109', '0,1,109,', 'common_group_manage', '公共组管理', '5090', '/basics/commonGroup/list', '', 'fa fa-object-ungroup', '1', '', '1', '2019-05-27 16:15:23', '1', '2019-05-28 15:28:59', '', '1', NULL, '0', '0', NULL);

# 配置
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('605', '', '1', 'IP_COMMON_GROUP', 'IP公共组管理', '1', '1', '1', NULL, '2019-05-27 14:50:16', NULL, NULL, '', '', '', '4,6', '', '', '1,2,3;1,2,3', '1,2;1,2', '0,1', '0,6,17', '1,2,3,4', '1', '1');
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('606', '', '2', 'URL_COMMON_GROUP', 'URL公共组管理', '1', '1', '2', NULL, '2019-05-27 16:00:39', NULL, NULL, '', '0,1', '0,1,2,3', '', '0', '1', NULL, NULL, NULL, NULL, NULL, '1', '1');
INSERT INTO `function_region_dict`(`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('607', '', '1', 'DOMAIN_COMMON_GROUP', '域名公共组管理', '1', '1', '2', NULL, '2019-06-06 14:43:53', NULL, NULL, '', '0', '1,3', '', '2', '0', NULL, NULL, NULL, NULL, NULL, '1', '1');
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('608', '', '1', 'SCRIBERID_COMMON_GROUP', '账号公共组管理', '1', '1', '2', NULL, '2019-06-06 15:32:02', NULL, NULL, '', '0', '3', '', '0', '0', NULL, NULL, NULL, NULL, NULL, '1', '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 ('605', '0', '1', 'monit', '0', 'ip_common_group', NULL, '1', '1', '2019-05-27 14:47:47', NULL, NULL, '1', '1', '0', 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 ('606', '0', '1', 'monit', '0', 'url_common_group', NULL, '1', '1', '2019-05-27 15:59:43', NULL, NULL, '2', '1', '0', 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 ('607', '0', '1', 'monit', '0', 'domain_common_group', '', '1', NULL, '2019-06-06 15:24:56', NULL, NULL, '2', '1', '0', 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 ('608', '0', '1', 'monit', '0', 'scriberid_common_group', NULL, '1', NULL, '2019-06-06 15:24:52', NULL, NULL, '2', '1', '0', NULL);


# 字典
INSERT INTO `sys_data_dictionary_item` (
	`item_code`,
	`item_value`,
	`item_desc`,
	`item_sort`,
	`status`,
	`type`,
	`dictionary_id`
)
VALUES
	(
		'7',
		'URL GROUP',
		'普通URL组',
		'0',
		'1',
		'1',
		(SELECT id FROM sys_data_dictionary_name WHERE mark = 'GROUP_TYPE')
	),
	(
		'8',
		'DOMAIN GROUP',
		'普通域名组',
		'0',
		'1',
		'1',
		(SELECT id FROM sys_data_dictionary_name WHERE mark = 'GROUP_TYPE')
	),
	(
		'9',
		'SCRIBERID GROUP',
		'普通账号组',
		'0',
		'1',
		'1',
		(SELECT id FROM sys_data_dictionary_name WHERE mark = 'GROUP_TYPE')
	);


# 修改表字段注释
ALTER TABLE policy_group_info MODIFY COLUMN group_type INT(2) DEFAULT NULL COMMENT '1:dns 2:ip复用, 4:asn, 5：IP通用组, 7：URL通用组, 8：Domain通用组, 9：SubscribeId通用组',
	MODIFY COLUMN ud_flag INT(2) NOT NULL DEFAULT 0 COMMENT '0：不可用，1：未被引用（可用），2：已被引用（可用）|默认0';
