ALTER TABLE `risk_activity`
ADD COLUMN `isShenBao` varchar(1) NULL COMMENT '是否为申报活动，有到内网的都是' AFTER `activitySource`;
ALTER TABLE `risk_activity`
ADD COLUMN `isPushToSB` varchar(1) NULL COMMENT '是否推送到申报子站' AFTER `isShenBao`;
ALTER TABLE `risk_activity`
ADD COLUMN `pushResult` varchar(1) NULL COMMENT '推送结果' AFTER `isPushToSB`;


ALTER TABLE `risk_materialformattr` DROP FOREIGN KEY `FKhpaw3k1a5fdkfhuu7p5ci1ppp`;
ALTER TABLE `risk_materialformmenu` DROP FOREIGN KEY `FKnkqolo7c4vc62ax962mh0ue0y`;
ALTER TABLE `risk_materialformvalue` DROP FOREIGN KEY `FK5n0jy5lev0po8tth50w8h66ub`;
ALTER TABLE `risk_materialformvalue` DROP FOREIGN KEY `FKeqehn9sex3vajx9amtrx8hk7k`;


-- 更新在线申报的活动的申报状态
update risk_activity set isShenBao=1 where activitySource=1;



-- 增加推送日志
CREATE TABLE `risk_push_log` (
  `oid` bigint(20) NOT NULL AUTO_INCREMENT,
  `batchNo` varchar(255) DEFAULT NULL COMMENT '批次号',
  `startTime` datetime DEFAULT NULL COMMENT '开始时间',
  `endTime` datetime DEFAULT NULL COMMENT '结束时间',
  `speedTime` bigint(20) DEFAULT NULL COMMENT '耗时',
  `success` varchar(255) DEFAULT NULL COMMENT '成功数',
  `fail` varchar(255) DEFAULT NULL COMMENT '失败数',
  `total` varchar(255) DEFAULT NULL COMMENT '总数',
  `flag` varchar(255) DEFAULT NULL COMMENT '成功，部分成功，失败',
  `msg` text COMMENT '消息',
  `pushType` varchar(255) DEFAULT NULL COMMENT '推送类型',
  `pushTypeName` varchar(255) DEFAULT NULL COMMENT '推送类型名称',
  `pushMethod` varchar(255) DEFAULT NULL COMMENT '推送方式',
  `paramData`  text NULL DEFAULT NULL COMMENT '参数',
  `createOn` datetime DEFAULT NULL,
  `updateOn` datetime DEFAULT NULL,
  PRIMARY KEY (`oid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='推送日志';


-- 修改日志
CREATE TABLE `risk_change_log` (
  `oid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `billId` varchar(50) DEFAULT NULL,
  `activityNo` varchar(50) DEFAULT NULL,
  `billCategory` varchar(255) DEFAULT NULL,
  `billType` varchar(255) DEFAULT NULL,
  `keyName` varchar(255) DEFAULT NULL,
  `text` varchar(255) DEFAULT NULL,
  `sourceVal` varchar(255) DEFAULT NULL,
  `nowVal` varchar(255) DEFAULT NULL,
  `changeVersion` varchar(255) DEFAULT NULL,
  `changeDate` datetime DEFAULT NULL,
  `isNew` varchar(1) DEFAULT NULL,
  `flagId` varchar(255) DEFAULT NULL,
  `markerRegionId` bigint(20) DEFAULT NULL COMMENT '落地省份',
  `source` varchar(255) DEFAULT NULL COMMENT '来源',
  `isUpdate` varchar(1) DEFAULT NULL,
  `createOn` datetime DEFAULT NULL,
  `updateOn` datetime DEFAULT NULL,
  `remark` varchar(1000) DEFAULT NULL,
  PRIMARY KEY (`oid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;







