
INSERT INTO `risk_menu` (`oid`, `createOn`, `updateOn`, `menuCode`, `menuDesc`, `menuName`, `parent_id`, `menuType`) VALUES ('10115', '2018-06-20 11:10:08', NULL, NULL, '15', '知识文库管理', '101', '1');
INSERT INTO `risk_menu` (`oid`, `createOn`, `updateOn`, `menuCode`, `menuDesc`, `menuName`, `parent_id`, `menuType`) VALUES ('10116', '2018-09-10 11:10:08', NULL, NULL, '16', '短信管理', '101', '1');


CREATE TABLE `risk_knowledge_base` (
  `oid` bigint(20) NOT NULL AUTO_INCREMENT,
  `createOn` datetime DEFAULT NULL,
  `updateOn` datetime DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL COMMENT '栏目类型',
  `title` varchar(255) DEFAULT NULL COMMENT '标题',
  `content` mediumtext COMMENT '内容',
  PRIMARY KEY (`oid`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;

INSERT INTO `sys_dict` ( `createOn`, `updateOn`, `description`, `label`, `sort`, `type`, `value`) VALUES ( now(), now(), '知识文库类型', '安全评估', '1', 'KNOWLEDGETYPE', '1');
INSERT INTO `sys_dict` ( `createOn`, `updateOn`, `description`, `label`, `sort`, `type`, `value`) VALUES ( now(), now(), '知识文库类型', '人员管控', '2', 'KNOWLEDGETYPE', '2');
INSERT INTO `sys_dict` ( `createOn`, `updateOn`, `description`, `label`, `sort`, `type`, `value`) VALUES ( now(), now(), '知识文库类型', '场地布局与安全导向标识', '3', 'KNOWLEDGETYPE', '3');
INSERT INTO `sys_dict` ( `createOn`, `updateOn`, `description`, `label`, `sort`, `type`, `value`) VALUES ( now(), now(), '知识文库类型', '临建设施指南', '4', 'KNOWLEDGETYPE', '4');
INSERT INTO `sys_dict` ( `createOn`, `updateOn`, `description`, `label`, `sort`, `type`, `value`) VALUES ( now(), now(), '知识文库类型', '安保资源配置', '5', 'KNOWLEDGETYPE', '5');


INSERT INTO `sys_dict`(`createOn`, `updateOn`, `description`, `label`, `sort`, `type`, `value`) VALUES ( now(), now(), '活动来源', '在线创建', 3, 'ACTIVITYSOURCE', '3');



ALTER TABLE `risk_materialformattrtemplate`
ADD COLUMN `locked` varchar(10) NULL COMMENT '是否锁定不让修改' AFTER `maxFileSize`;

ALTER TABLE `risk_materialformattr`
ADD COLUMN `locked` varchar(10) NULL COMMENT '是否锁定不让修改' AFTER `maxFileSize`;




CREATE TABLE `log_smslog` (
  `oid` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `createOn` datetime DEFAULT NULL COMMENT '创建时间',
  `updateOn` datetime DEFAULT NULL COMMENT '修改时间',
  `phone` varchar(20) DEFAULT NULL COMMENT '手机号',
  `content` varchar(255) DEFAULT NULL COMMENT '内容',
  `success` varchar(10) DEFAULT NULL COMMENT '发送状态',
  PRIMARY KEY (`oid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;



CREATE TABLE `config_notifyPerson` (
  `oid` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `createOn` datetime DEFAULT NULL COMMENT '创建时间',
  `updateOn` datetime DEFAULT NULL COMMENT '修改时间',
	`notifyPersonType` varchar(20) DEFAULT NULL COMMENT '通知类型',
  `phone` varchar(255) DEFAULT NULL COMMENT '手机号',
  `email` varchar(255) DEFAULT NULL COMMENT '邮箱',
  PRIMARY KEY (`oid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;


TRUNCATE table risk_smslog;



delete from risk_materialformattrtemplate where attrCode in (
'G2',
'G3',
'G4',
'G5',
'G16',
'G18',
'G21',
'G20',
'G42',
'G43',
'G44'
);

update risk_materialformattrtemplate
set tips = '需要包含的预案内容有反恐防爆、火灾、临建倒塌、防踩踏等预案工作'
where attrCode = 'G45';


insert into sys_marketregion values (110000,now(),now(),null,100000,'北京市',1,null,null,0);
insert into sys_marketregion values (120000,now(),now(),null,100000,'天津市',1,null,null,0);
insert into sys_marketregion values (130000,now(),now(),null,100000,'河北省',1,null,null,0);
insert into sys_marketregion values (140000,now(),now(),null,100000,'山西省',1,null,null,0);
insert into sys_marketregion values (150000,now(),now(),null,100000,'内蒙古自治区',1,null,null,0);
insert into sys_marketregion values (210000,now(),now(),null,100000,'辽宁省',1,null,null,0);
insert into sys_marketregion values (220000,now(),now(),null,100000,'吉林省',1,null,null,0);
insert into sys_marketregion values (230000,now(),now(),null,100000,'黑龙江省',1,null,null,0);
insert into sys_marketregion values (310000,now(),now(),null,100000,'上海市',1,null,null,0);
insert into sys_marketregion values (320000,now(),now(),null,100000,'江苏省',1,null,null,0);
insert into sys_marketregion values (340000,now(),now(),null,100000,'安徽省',1,null,null,0);
insert into sys_marketregion values (350000,now(),now(),null,100000,'福建省',1,null,null,0);
insert into sys_marketregion values (360000,now(),now(),null,100000,'江西省',1,null,null,0);
insert into sys_marketregion values (370000,now(),now(),null,100000,'山东省',1,null,null,0);
insert into sys_marketregion values (410000,now(),now(),null,100000,'河南省',1,null,null,0);
insert into sys_marketregion values (420000,now(),now(),null,100000,'湖北省',1,null,null,0);
insert into sys_marketregion values (430000,now(),now(),null,100000,'湖南省',1,null,null,0);
insert into sys_marketregion values (440000,now(),now(),null,100000,'广东省',1,null,null,0);
insert into sys_marketregion values (460000,now(),now(),null,100000,'海南省',1,null,null,0);
insert into sys_marketregion values (500000,now(),now(),null,100000,'重庆市',1,null,null,0);
insert into sys_marketregion values (510000,now(),now(),null,100000,'四川省',1,null,null,0);
insert into sys_marketregion values (520000,now(),now(),null,100000,'贵州省',1,null,null,0);
insert into sys_marketregion values (530000,now(),now(),null,100000,'云南省',1,null,null,0);
insert into sys_marketregion values (540000,now(),now(),null,100000,'西藏自治区',1,null,null,0);
insert into sys_marketregion values (620000,now(),now(),null,100000,'甘肃省',1,null,null,0);
insert into sys_marketregion values (630000,now(),now(),null,100000,'青海省',1,null,null,0);
insert into sys_marketregion values (640000,now(),now(),null,100000,'宁夏回族自治区',1,null,null,0);
insert into sys_marketregion values (650000,now(),now(),null,100000,'新疆维吾尔自治区',1,null,null,0);
insert into sys_marketregion values (710000,now(),now(),null,100000,'台湾省',1,null,null,0);
insert into sys_marketregion values (810000,now(),now(),null,100000,'香港特别行政区',1,null,null,0);
insert into sys_marketregion values (820000,now(),now(),null,100000,'澳门特别行政区',1,null,null,0);


INSERT INTO `sys_dict`( `createOn`, `updateOn`, `description`, `label`, `sort`, `type`, `value`)
VALUES ( now(), now(), '订单状态', '退款', 6, 'ORDERSTATUS', '100');

INSERT INTO `sys_dict`( `createOn`, `updateOn`, `description`, `label`, `sort`, `type`, `value`)
VALUES ( now(), now(), '订单状态', '已取消', 7, 'ORDERSTATUS', '200');


DELETE FROM risk_role_menu WHERE menu_id = '1020222';
DELETE FROM risk_menu WHERE oid ='1020222';


INSERT INTO `risk_menu` (`oid`, `createOn`, `updateOn`, `menuCode`, `menuDesc`, `menuName`, `parent_id`, `menuType`) VALUES ('1020105', '2018-09-13 16:56:43', NULL, NULL, '5', '动态看板', '10201', '2');
