CREATE TABLE ta_channel_proxy(
    `channel_id` INT NOT NULL AUTO_INCREMENT  COMMENT '渠道id' ,
    `channel_proxy_name` VARCHAR(64)    COMMENT '渠道代理商名称' ,
    `channel_img` TEXT    COMMENT '渠道logo' ,
    `channel_contact_name` VARCHAR(32)    COMMENT '联系人' ,
    `channel_tel` VARCHAR(32)    COMMENT '手机' ,
    `user_name` VARCHAR(64)    COMMENT '账号名' ,
	`password` VARCHAR(128)    COMMENT '密码' ,
    `expire_date` DATETIME    COMMENT '有效期' ,
    `status` INT    COMMENT '状态' ,
    `app_max_num` INT    COMMENT '维护小程序数量' ,
    `create_time` DATETIME    COMMENT '创建时间' ,
    PRIMARY KEY (channel_id)
) COMMENT = '渠道代理表 ';;


CREATE TABLE ta_channel_app_relation(
    `relation_id` INT NOT NULL AUTO_INCREMENT  COMMENT '关系id' ,
    `channel_id` INT    COMMENT '渠道id' ,
    `org_id` INT    COMMENT '公司id' ,
    `create_time` DATETIME    COMMENT '创建时间' ,
    PRIMARY KEY (relation_id)
) COMMENT = '渠道小程序关系表';;


alter table sys_user add type varchar(64) not null;

-- 修改主键
INSERT INTO `sys_user` VALUES ('admin', '28c8edde3d61a0411511d3b1866f0636', '1', '1', 1, 'channel');
--INSERT INTO `sys_user` VALUES ('admin', '28c8edde3d61a0411511d3b1866f0636', '1', '1', 1, 'center');

alter table td_biz_event add points int(16);

alter table ta_building_dynamic add home int; 
alter table ta_building add property_developer VARCHAR(128);
alter table ta_building add building_num VARCHAR(128) ;
alter table ta_building add record_name VARCHAR(128) ;
alter table ta_building modify opening_date varchar(32);

alter table ta_drainage add qr_code varchar(1024);


insert into ta_channel_proxy(channel_id, channel_proxy_name,  channel_contact_name, channel_tel, user_name, password, expire_date, status, app_max_num, create_time) value (1, '系统管理员', '系统管理员',18888888888, 'admin', '1dfe46eda38305ebf953fb2ace2ade8f', '9999-09-02', 1, 1, '9999-09-02');


insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 15, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 21, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 27, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 35, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 25, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 26, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 24, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 30, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 11, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 23, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 18, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 29, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 19, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 37, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 34, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 33, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 14, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 36, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 12, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 32, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 13, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 31, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 28, '2020-12-12');
insert into ta_channel_app_relation(channel_id,org_id,create_time) VALUES (1, 16, '2020-12-12');
								
								
update td_biz_event t set t.points = 1 where t.event_id = 1;
update td_biz_event t set t.points = 8 where t.event_id = 4;
update td_biz_event t set t.points = 3 where t.event_id = 5;
update td_biz_event t set t.points = 8 where t.event_id = 6;
update td_biz_event t set t.points = 2 where t.event_id = 7;
update td_biz_event t set t.points = 2 where t.event_id = 8;
update td_biz_event t set t.points = 2 where t.event_id = 9;
update td_biz_event t set t.points = 2 where t.event_id = 10;
update td_biz_event t set t.points = 2 where t.event_id = 11;
update td_biz_event t set t.points = 3 where t.event_id = 12;
update td_biz_event t set t.points = 5 where t.event_id = 13;
update td_biz_event t set t.points = 3 where t.event_id = 14;
update td_biz_event t set t.points = 8 where t.event_id = 15;
update td_biz_event t set t.points = 2 where t.event_id = 16;
update td_biz_event t set t.points = 2 where t.event_id = 17;
update td_biz_event t set t.points = 5 where t.event_id = 18;
update td_biz_event t set t.points = 2 where t.event_id = 19;
update td_biz_event t set t.points = 3 where t.event_id = 20;
update td_biz_event t set t.points = 2 where t.event_id = 21;
update td_biz_event t set t.points = 5 where t.event_id = 22;
update td_biz_event t set t.points = 1 where t.event_id = 23;
update td_biz_event t set t.points = 1 where t.event_id = 24;
update td_biz_event t set t.points = 1 where t.event_id = 25;
update td_biz_event t set t.points = 1 where t.event_id = 26;
update td_biz_event t set t.points = 1 where t.event_id = 27;
update td_biz_event t set t.points = 1 where t.event_id = 28;

update ta_building_intention t set t.intention = 1 where t.event_id = 1;
update ta_building_intention t set t.intention = 8 where t.event_id = 4;
update ta_building_intention t set t.intention = 3 where t.event_id = 5;
update ta_building_intention t set t.intention = 8 where t.event_id = 6;
update ta_building_intention t set t.intention = 2 where t.event_id = 7;
update ta_building_intention t set t.intention = 2 where t.event_id = 8;
update ta_building_intention t set t.intention = 2 where t.event_id = 9;
update ta_building_intention t set t.intention = 2 where t.event_id = 10;
update ta_building_intention t set t.intention = 2 where t.event_id = 11;
update ta_building_intention t set t.intention = 3 where t.event_id = 12;
update ta_building_intention t set t.intention = 5 where t.event_id = 13;
update ta_building_intention t set t.intention = 3 where t.event_id = 14;
update ta_building_intention t set t.intention = 8 where t.event_id = 15;
update ta_building_intention t set t.intention = 2 where t.event_id = 16;
update ta_building_intention t set t.intention = 2 where t.event_id = 17;
update ta_building_intention t set t.intention = 5 where t.event_id = 18;
update ta_building_intention t set t.intention = 2 where t.event_id = 19;
update ta_building_intention t set t.intention = 3 where t.event_id = 20;
update ta_building_intention t set t.intention = 2 where t.event_id = 21;
update ta_building_intention t set t.intention = 5 where t.event_id = 22;
update ta_building_intention t set t.intention = 1 where t.event_id = 23;
update ta_building_intention t set t.intention = 1 where t.event_id = 24;
update ta_building_intention t set t.intention = 1 where t.event_id = 25;
update ta_building_intention t set t.intention = 1 where t.event_id = 26;
update ta_building_intention t set t.intention = 1 where t.event_id = 27;
update ta_building_intention t set t.intention = 1 where t.event_id = 28;

update td_points_rules t set t.rule_name = '分享转发' where t.rule_name = '分享海报';

CREATE TABLE ts_person_from_statistic(
    `person_from_statistic_id` INT NOT NULL AUTO_INCREMENT  COMMENT 'ID' ,
    `scene_type` VARCHAR(32)    COMMENT '场景类型' ,
    `event_type` VARCHAR(32)    COMMENT '事件类型' ,
    `from_num` INT    COMMENT '来源数量' ,
    `org_id` INT    COMMENT '公司id' ,
    `create_date` DATETIME    COMMENT '创建时间' ,
    `registered_num` INT    COMMENT '注册数量' ,
    PRIMARY KEY (person_from_statistic_id)
) COMMENT = '用户来源统计表 ';;


CREATE TABLE ta_person_from_record(
    `from_record_id` INT NOT NULL AUTO_INCREMENT  COMMENT '新增用户来源id' ,
    `scene_id` VARCHAR(32)    COMMENT '微信来源字典id' ,
    `scene_type` VARCHAR(32)    COMMENT '微信来源类型' ,
    `person_id` VARCHAR(128)    COMMENT '新增用户id' ,
    `is_first_time` TINYINT(1)    COMMENT '是否第一次' ,
    `target_id` VARCHAR(32)    COMMENT '类型ID值' ,
    `share_person_id` VARCHAR(32)    COMMENT '分享人Id' ,
    `create_date` DATETIME    COMMENT '创建时间' ,
    `org_id` INT    COMMENT '公司id' ,
    `building_id` VARCHAR(64)    COMMENT '楼盘id' ,
    `event` VARCHAR(32)    COMMENT '事件' ,
    `event_type` VARCHAR(32)    COMMENT '事件类型' ,
    `activity` VARCHAR(128)    COMMENT '行为' ,
    `target_type` VARCHAR(32)    COMMENT '类型' ,
    PRIMARY KEY (from_record_id)
) COMMENT = '新增用户来源表 ';;


CREATE TABLE td_wx_dict(
    `scene_id` VARCHAR(32) NOT NULL   COMMENT '场景值id' ,
    `scene_name` VARCHAR(1024)    COMMENT '场景名称' ,
    `scene_type` VARCHAR(1024)    COMMENT '场景类型' ,
    `scene_alias` VARCHAR(32)    COMMENT '场景类型别名' ,
    PRIMARY KEY (scene_id)
) COMMENT = '微信字典表 ';;


INSERT INTO `td_wx_dict`(`scene_id`, `scene_name`, `scene_type`, `scene_alias`) VALUES ('1000', '其他', 'other', '其他');
INSERT INTO `td_wx_dict`(`scene_id`, `scene_name`, `scene_type`, `scene_alias`) VALUES ('1005', '微信首页顶部搜索框的搜索结果页', 'search', '自主搜索');
INSERT INTO `td_wx_dict`(`scene_id`, `scene_name`, `scene_type`, `scene_alias`) VALUES ('1006', '微信首页顶部搜索框的搜索结果页', 'search', '自主搜索');
INSERT INTO `td_wx_dict`(`scene_id`, `scene_name`, `scene_type`, `scene_alias`) VALUES ('1007', '单人聊天会话中的小程序消息卡片', 'buddy_share', '好友分享');
INSERT INTO `td_wx_dict`(`scene_id`, `scene_name`, `scene_type`, `scene_alias`) VALUES ('1008', '群聊会话中的小程序消息卡片', 'group_share', '群分享');
INSERT INTO `td_wx_dict`(`scene_id`, `scene_name`, `scene_type`, `scene_alias`) VALUES ('1042', '添加好友搜索框的搜索结果页', 'search', '自主搜索');
INSERT INTO `td_wx_dict`(`scene_id`, `scene_name`, `scene_type`, `scene_alias`) VALUES ('1045', '朋友圈广告', 'advertising', '朋友圈广告');
INSERT INTO `td_wx_dict`(`scene_id`, `scene_name`, `scene_type`, `scene_alias`) VALUES ('1046', '朋友圈广告详情页', 'advertising', '朋友圈广告');
INSERT INTO `td_wx_dict`(`scene_id`, `scene_name`, `scene_type`, `scene_alias`) VALUES ('1047', '扫描小程序码', 'mini_program_code', '小程序码');
INSERT INTO `td_wx_dict`(`scene_id`, `scene_name`, `scene_type`, `scene_alias`) VALUES ('1048', '长按图片识别小程序码', 'mini_program_code', '小程序码');
INSERT INTO `td_wx_dict`(`scene_id`, `scene_name`, `scene_type`, `scene_alias`) VALUES ('1053', '搜一搜的结果页', 'search', '自主搜索');
INSERT INTO `td_wx_dict`(`scene_id`, `scene_name`, `scene_type`, `scene_alias`) VALUES ('1058', '公众号文章', 'article', '公众号文章');
INSERT INTO `td_wx_dict`(`scene_id`, `scene_name`, `scene_type`, `scene_alias`) VALUES ('1067', '公众号文章广告', 'article', '公众号文章');





INSERT INTO  `td_biz_event`(`event_id`, `event_code`, `event_name`, `remark`, `status`, `create_date`) VALUES (29, 'search', '搜索', NULL, 1, '2019-12-31 14:11:34');
INSERT INTO  `td_biz_event`(`event_id`, `event_code`, `event_name`, `remark`, `status`, `create_date`) VALUES (32, 'map_house', '地图看房', NULL, 1, '2019-12-31 14:11:34');
INSERT INTO  `td_biz_event`(`event_id`, `event_code`, `event_name`, `remark`, `status`, `create_date`) VALUES (33, 'signin', '签到', NULL, 1, '2019-12-31 14:11:34');
INSERT INTO  `td_biz_event`(`event_id`, `event_code`, `event_name`, `remark`, `status`, `create_date`) VALUES (35, 'points_rule', '查看积分规则', NULL, 1, '2019-12-31 14:11:34');
INSERT INTO  `td_biz_event`(`event_id`, `event_code`, `event_name`, `remark`, `status`, `create_date`) VALUES (36, 'points_details', '查看积分明细', NULL, 1, '2019-12-31 14:11:34');
INSERT INTO  `td_biz_event`(`event_id`, `event_code`, `event_name`, `remark`, `status`, `create_date`) VALUES (38, 'material', '提交资料', NULL, 1, '2019-12-31 14:11:34');
INSERT INTO  `td_biz_event`(`event_id`, `event_code`, `event_name`, `remark`, `status`, `create_date`) VALUES (39, 'feedback', '提交反馈', NULL, 1, '2019-12-31 14:11:34');
INSERT INTO  `td_biz_event`(`event_id`, `event_code`, `event_name`, `remark`, `status`, `create_date`) VALUES (44, 'communicate', '在线沟通', NULL, 1, '2019-12-31 14:11:34');
INSERT INTO  `td_biz_event`(`event_id`, `event_code`, `event_name`, `remark`, `status`, `create_date`) VALUES (50, 'more', '查看更多楼盘信息', NULL, 1, '2019-12-31 14:11:34');
INSERT INTO  `td_biz_event`(`event_id`, `event_code`, `event_name`, `remark`, `status`, `create_date`) VALUES (57, 'participate', '参与活动', NULL, 1, '2019-12-31 14:11:34');
INSERT INTO  `td_biz_event`(`event_id`, `event_code`, `event_name`, `remark`, `status`, `create_date`) VALUES (64, 'exchange', '兑换商品', NULL, 1, '2019-12-31 14:11:34');


INSERT INTO  `td_biz_event_type`(`type_id`, `type_name`, `status`, `create_date`, `parent_type_id`) VALUES ('integral', '积分商城', 1, '2019-12-31 13:42:16', 'public');
INSERT INTO  `td_biz_event_type`(`type_id`, `type_name`, `status`, `create_date`, `parent_type_id`) VALUES ('main', '首页', 1, '2019-08-06 16:10:20', 'public');
INSERT INTO  `td_biz_event_type`(`type_id`, `type_name`, `status`, `create_date`, `parent_type_id`) VALUES ('mall', '商品', 1, '2019-12-31 13:44:28', 'project');
INSERT INTO  `td_biz_event_type`(`type_id`, `type_name`, `status`, `create_date`, `parent_type_id`) VALUES ('news', '资讯', 1, '2019-08-06 16:10:20', 'project');


UPDATE  `td_biz_event_type` SET `type_name` = '活动', `status` = 1, `create_date` = '2019-08-06 16:10:20', `parent_type_id` = 'project' WHERE `type_id` = 'activity';
UPDATE  `td_biz_event_type` SET `type_name` = '客户', `status` = 1, `create_date` = '2019-08-06 16:10:20', `parent_type_id` = NULL WHERE `type_id` = 'agent';
UPDATE  `td_biz_event_type` SET `type_name` = '项目', `status` = 1, `create_date` = '2019-08-06 16:10:20', `parent_type_id` = 'project' WHERE `type_id` = 'building';
UPDATE  `td_biz_event_type` SET `type_name` = '名片', `status` = 1, `create_date` = '2019-08-06 16:10:20', `parent_type_id` = 'project' WHERE `type_id` = 'card';
UPDATE  `td_biz_event_type` SET `type_name` = '个人中心', `status` = 1, `create_date` = '2019-12-31 13:43:04', `parent_type_id` = 'public' WHERE `type_id` = 'center';
UPDATE  `td_biz_event_type` SET `type_name` = 'H5', `status` = 1, `create_date` = '2019-12-07 00:00:00', `parent_type_id` = 'public' WHERE `type_id` = 'h5';
UPDATE  `td_biz_event_type` SET `type_name` = '咨询', `status` = 1, `create_date` = '2019-08-06 16:10:20', `parent_type_id` = NULL WHERE `type_id` = 'info';


ALTER TABLE td_biz_event_type ADD parent_type_id varchar(64) COMMENT '父级id';


UPDATE  `td_biz_event` SET `event_code` = 'index', `event_name` = '进入首页', `remark` = NULL, `status` = 0, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 1;
UPDATE  `td_biz_event` SET `event_code` = 'phone', `event_name` = '拨打电话', `remark` = NULL, `status` = 1, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 4;
UPDATE  `td_biz_event` SET `event_code` = 'calculator', `event_name` = '计算房贷', `remark` = NULL, `status` = 1, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 5;
UPDATE  `td_biz_event` SET `event_code` = 'qualified', `event_name` = '购房资格', `remark` = NULL, `status` = 0, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 6;
UPDATE  `td_biz_event` SET `event_code` = 'policy', `event_name` = '查看购房百科', `remark` = NULL, `status` = 1, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 7;
UPDATE  `td_biz_event` SET `event_code` = 'detail', `event_name` = '查看详情', `remark` = NULL, `status` = 1, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 8;
UPDATE  `td_biz_event` SET `event_code` = 'peripheral ', `event_name` = '查看周边配套', `remark` = NULL, `status` = 1, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 9;
UPDATE  `td_biz_event` SET `event_code` = 'apartment', `event_name` = '查看户型', `remark` = NULL, `status` = 1, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 10;
UPDATE  `td_biz_event` SET `event_code` = 'album', `event_name` = '查看相册', `remark` = NULL, `status` = 1, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 11;
UPDATE  `td_biz_event` SET `event_code` = 'consultants', `event_name` = '查看置业顾问列表', `remark` = NULL, `status` = 1, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 12;
UPDATE  `td_biz_event` SET `event_code` = 'share', `event_name` = '分享', `remark` = NULL, `status` = 1, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 13;
UPDATE  `td_biz_event` SET `event_code` = 'poster', `event_name` = '生成海报', `remark` = NULL, `status` = 1, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 14;
UPDATE  `td_biz_event` SET `event_code` = 'enlist', `event_name` = '报名', `remark` = NULL, `status` = 0, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 15;
UPDATE  `td_biz_event` SET `event_code` = 'save', `event_name` = '收藏', `remark` = NULL, `status` = 1, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 16;
UPDATE  `td_biz_event` SET `event_code` = 'like', `event_name` = '点赞', `remark` = NULL, `status` = 1, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 17;
UPDATE  `td_biz_event` SET `event_code` = 'sync', `event_name` = '同步通讯录', `remark` = NULL, `status` = 0, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 18;
UPDATE  `td_biz_event` SET `event_code` = 'navigation', `event_name` = '导航', `remark` = NULL, `status` = 1, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 19;
UPDATE  `td_biz_event` SET `event_code` = 'essential', `event_name` = '咨询-关键内容', `remark` = NULL, `status` = 0, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 20;
UPDATE  `td_biz_event` SET `event_code` = 'common', `event_name` = '咨询-常用问题', `remark` = NULL, `status` = 0, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 21;
UPDATE  `td_biz_event` SET `event_code` = 'recommend', `event_name` = '推荐客户', `remark` = NULL, `status` = 1, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 22;
UPDATE  `td_biz_event` SET `event_code` = 'list', `event_name` = '列表', `remark` = NULL, `status` = 0, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 23;
UPDATE  `td_biz_event` SET `event_code` = 'myagent', `event_name` = '我的客户', `remark` = NULL, `status` = 0, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 24;
UPDATE  `td_biz_event` SET `event_code` = 'progress', `event_name` = '客户进度', `remark` = NULL, `status` = 0, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 25;
UPDATE  `td_biz_event` SET `event_code` = 'person', `event_name` = '查看围观列表', `remark` = NULL, `status` = 1, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 26;
UPDATE  `td_biz_event` SET `event_code` = 'fans', `event_name` = '(名片)粉丝访问记录列表', `remark` = NULL, `status` = 0, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 27;
UPDATE  `td_biz_event` SET `event_code` = 'start', `event_name` = '进入小程序', `remark` = NULL, `status` = 0, `create_date` = '2019-08-08 17:54:42' WHERE `event_id` = 28;

ALTER TABLE ta_person_visit_record ADD target_type varchar(64) COMMENT '类型';

UPDATE `td_points_rules` SET   `remark` = '每日签到获取积分' WHERE `rule_name` = '签到';
UPDATE `td_points_rules` SET  `remark` = '好友通过您分享的小程序内容、海报进入小程序；您即可获取积分' WHERE `rule_name` = '分享海报';
UPDATE `td_points_rules` SET `remark` = '推荐有效客户，平台审核通过后即可获取积分' WHERE `rule_name` = '推荐客户';
UPDATE `td_points_rules` SET  `remark` = '成功授权手机号即可获取积分'  WHERE `rule_name` = '授权手机号';
UPDATE `td_points_rules` SET  `remark` = '上传有效证件，平台审核通过后即可获取积分'  WHERE `rule_name` = '资料审核';
UPDATE `td_points_rules` SET   `remark` = '报名参与活动，扫码签到后即可获取积分' WHERE `rule_name` = '活动签到';


	
INSERT INTO `td_biz_event_type`(`type_id`, `type_name`, `status`, `create_date`, `parent_type_id`) VALUES ('center', '个人中心', 1, '2019-12-31 13:43:04', 'public');
INSERT INTO `td_biz_event_type`(`type_id`, `type_name`, `status`, `create_date`, `parent_type_id`) VALUES ('h5', 'H5', 1, '2019-12-07 00:00:00', 'public');
INSERT INTO `td_biz_event_type`(`type_id`, `type_name`, `status`, `create_date`, `parent_type_id`) VALUES ('mall', '商品', 1, '2019-12-31 13:44:28', 'project');


update ta_person_visit_record t set t.event_type = 'activity', t.target_type = 'help' where t.event_type = 'help';
update ta_person_visit_record t set t.event_type = 'activity' , t.target_type = 'group' where t.event_type = 'group';