Commit 77b9bca0 by chizw

配置和数据库脚本

1 parent ba306197
-- scrm_aggregation.scrm_data_burying_point definition
-- ####################################### 小程序埋点 #########################################
-- 埋点表DDL
CREATE TABLE `scrm_data_burying_point` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号',
......@@ -80,3 +80,68 @@ INSERT INTO scrm_aggregation.scrm_model_field_mapping (model_name, field_index,
INSERT INTO scrm_aggregation.scrm_model_field_mapping (model_name, field_index, union_rule, model_flag, model_value, oneid_flag, expand_flag, unique_flag, del_flag) VALUES('scrm_data_burying_point', 225, NULL, NULL, NULL, NULL, NULL, NULL, 0);
INSERT INTO `scrm_aggregation`.`scrm_model_field_mapping` (`model_name`, `field_index`, `union_rule`, `model_flag`, `model_value`, `oneid_flag`, `expand_flag`, `unique_flag`, `del_flag`) VALUES ('scrm_customer_merge', '173', NULL, NULL, NULL, '1', NULL, NULL, '0');
-- ####################################### 业务埋点 #########################################
-- DDL
CREATE TABLE `scrm_business_burying_point` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号',
`one_id` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT 'oneID',
`staff_id` int(11) DEFAULT NULL COMMENT '发送人(员工id)',
`staff_uuid` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '员工uuid',
`create_time` datetime DEFAULT NULL COMMENT '事件发生时间',
`item_type` int(11) DEFAULT NULL COMMENT '物品类型',
`action_type` int(11) DEFAULT NULL COMMENT '动作类型',
`item_id` int(11) DEFAULT NULL COMMENT '物品唯一键',
`merchant_id` int(11) DEFAULT NULL COMMENT '商户号',
`business_type` int(11) DEFAULT NULL COMMENT '业务类型 (推荐分享、、、)',
`order_id` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '订单号',
`customer_phone` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '客户手机号',
`add_way` int(11) DEFAULT NULL COMMENT '来源',
`del_flag` int(2) DEFAULT NULL COMMENT '0正常,-1删除',
`created_by` int(11) DEFAULT NULL COMMENT '创建人',
`created_time` datetime DEFAULT NULL COMMENT '创建时间',
`updated_by` int(11) DEFAULT NULL COMMENT '更新人',
`updated_time` datetime DEFAULT NULL COMMENT '更新时间',
`md_value` text COLLATE utf8_bin COMMENT 'md5',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='用户业务埋点表';
CREATE TABLE `scrm_business_type_topic_config` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号',
`business_name` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT '业务名称',
`business_type` int(11) DEFAULT NULL COMMENT '业务类型',
`kafka_topic` varchar(50) COLLATE utf8_bin DEFAULT NULL COMMENT '卡夫卡topic',
`del_flag` int(2) DEFAULT NULL COMMENT '0正常,-1删除',
`created_by` int(11) DEFAULT NULL COMMENT '创建人',
`created_time` datetime DEFAULT NULL COMMENT '创建时间',
`updated_by` int(11) DEFAULT NULL COMMENT '更新人',
`updated_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='业务类型映射topic配置表';
-- DML
INSERT INTO scrm_aggregation.scrm_business_type_topic_config (business_name, business_type, kafka_topic, del_flag, created_by, created_time, updated_by, updated_time) VALUES('活动', 1, 'burying_point_type_share', 0, NULL, NULL, NULL, NULL);
INSERT INTO scrm_aggregation.scrm_business_type_topic_config (business_name, business_type, kafka_topic, del_flag, created_by, created_time, updated_by, updated_time) VALUES('优惠券', 2, 'burying_point_type_share', 0, NULL, NULL, NULL, NULL);
INSERT INTO scrm_aggregation.scrm_business_type_topic_config (business_name, business_type, kafka_topic, del_flag, created_by, created_time, updated_by, updated_time) VALUES('套餐', 3, 'burying_point_type_share', 0, NULL, NULL, NULL, NULL);
INSERT INTO scrm_aggregation.scrm_business_type_topic_config (business_name, business_type, kafka_topic, del_flag, created_by, created_time, updated_by, updated_time) VALUES('门店商品', 4, 'burying_point_type_share', 0, NULL, NULL, NULL, NULL);
INSERT INTO scrm_aggregation.scrm_basic_config (del_flag, bussiness_type, bussiness_count, model_name, event_flag, remark, created_time, created_by, updated_time, updated_by, oneid_belong) VALUES(0, 18, 2, 'scrm_business_burying_point', 1, '用户业务埋点表', '2022-06-23 10:34:15', NULL, NULL, NULL, 1);
INSERT INTO scrm_aggregation.scrm_basic_config_detail (field_index, field_name, field_type, field_length, field_describe, field_rule, field_alias, remark, del_flag, created_by, created_time, updated_by, updated_time) VALUES(242, 'staff_uuid', 'varchar', 100, '员工uuid', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL);
INSERT INTO scrm_aggregation.scrm_basic_config_detail (field_index, field_name, field_type, field_length, field_describe, field_rule, field_alias, remark, del_flag, created_by, created_time, updated_by, updated_time) VALUES(241, 'staff_id', 'int', 11, '员工ID', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL);
INSERT INTO scrm_aggregation.scrm_basic_config_detail (field_index, field_name, field_type, field_length, field_describe, field_rule, field_alias, remark, del_flag, created_by, created_time, updated_by, updated_time) VALUES(240, 'item_id', 'int', 11, '物品唯一键', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL);
INSERT INTO scrm_aggregation.scrm_basic_config_detail (field_index, field_name, field_type, field_length, field_describe, field_rule, field_alias, remark, del_flag, created_by, created_time, updated_by, updated_time) VALUES(239, 'action_type', 'int', 11, '动作类型', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL);
INSERT INTO scrm_aggregation.scrm_basic_config_detail (field_index, field_name, field_type, field_length, field_describe, field_rule, field_alias, remark, del_flag, created_by, created_time, updated_by, updated_time) VALUES(238, 'item_type', 'int', 11, '物品类型', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL);
INSERT INTO scrm_aggregation.scrm_model_field_mapping (model_name, field_index, union_rule, model_flag, model_value, oneid_flag, expand_flag, unique_flag, del_flag) VALUES('scrm_business_burying_point', 242, NULL, NULL, NULL, NULL, NULL, NULL, 0);
INSERT INTO scrm_aggregation.scrm_model_field_mapping (model_name, field_index, union_rule, model_flag, model_value, oneid_flag, expand_flag, unique_flag, del_flag) VALUES('scrm_business_burying_point', 63, NULL, NULL, NULL, NULL, NULL, NULL, 0);
INSERT INTO scrm_aggregation.scrm_model_field_mapping (model_name, field_index, union_rule, model_flag, model_value, oneid_flag, expand_flag, unique_flag, del_flag) VALUES('scrm_business_burying_point', 241, NULL, NULL, NULL, NULL, NULL, NULL, 0);
INSERT INTO scrm_aggregation.scrm_model_field_mapping (model_name, field_index, union_rule, model_flag, model_value, oneid_flag, expand_flag, unique_flag, del_flag) VALUES('scrm_business_burying_point', 240, NULL, NULL, NULL, NULL, NULL, NULL, 0);
INSERT INTO scrm_aggregation.scrm_model_field_mapping (model_name, field_index, union_rule, model_flag, model_value, oneid_flag, expand_flag, unique_flag, del_flag) VALUES('scrm_business_burying_point', 239, NULL, 1, NULL, NULL, NULL, NULL, 0);
INSERT INTO scrm_aggregation.scrm_model_field_mapping (model_name, field_index, union_rule, model_flag, model_value, oneid_flag, expand_flag, unique_flag, del_flag) VALUES('scrm_business_burying_point', 238, NULL, NULL, NULL, NULL, NULL, NULL, 0);
INSERT INTO scrm_aggregation.scrm_model_field_mapping (model_name, field_index, union_rule, model_flag, model_value, oneid_flag, expand_flag, unique_flag, del_flag) VALUES('scrm_business_burying_point', 206, NULL, NULL, NULL, NULL, NULL, NULL, 0);
INSERT INTO scrm_aggregation.scrm_model_field_mapping (model_name, field_index, union_rule, model_flag, model_value, oneid_flag, expand_flag, unique_flag, del_flag) VALUES('scrm_business_burying_point', 180, NULL, NULL, NULL, NULL, NULL, NULL, 0);
INSERT INTO scrm_aggregation.scrm_model_field_mapping (model_name, field_index, union_rule, model_flag, model_value, oneid_flag, expand_flag, unique_flag, del_flag) VALUES('scrm_business_burying_point', 134, NULL, NULL, NULL, NULL, NULL, NULL, 0);
INSERT INTO scrm_aggregation.scrm_model_field_mapping (model_name, field_index, union_rule, model_flag, model_value, oneid_flag, expand_flag, unique_flag, del_flag) VALUES('scrm_business_burying_point', 62, NULL, NULL, NULL, NULL, NULL, NULL, 0);
INSERT INTO scrm_aggregation.scrm_model_field_mapping (model_name, field_index, union_rule, model_flag, model_value, oneid_flag, expand_flag, unique_flag, del_flag) VALUES('scrm_business_burying_point', 7, NULL, NULL, NULL, NULL, NULL, NULL, 0);
INSERT INTO scrm_aggregation.scrm_model_field_mapping (model_name, field_index, union_rule, model_flag, model_value, oneid_flag, expand_flag, unique_flag, del_flag) VALUES('scrm_business_burying_point', 4, NULL, NULL, NULL, NULL, NULL, NULL, 0);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!