Commit 655acdc5 authored by yanghao's avatar yanghao

Merge branch 'release-fix' into release

parents 0678b7da d9e2e600
......@@ -82,6 +82,44 @@ VALUES (1, '1', '等待消息', 'Waiting for message', 'customer_followup_result
-- ----------------------------
-- Table structure for ecw_customer_followup
-- ----------------------------
DROP TABLE IF EXISTS `ecw_customer_followup`;
CREATE TABLE `ecw_customer_followup` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`number` varchar(64) NULL DEFAULT NULL COMMENT '编号',
`parent_number` varchar(64) NULL DEFAULT NULL COMMENT '上一级跟进单号',
`status` int NULL DEFAULT NULL COMMENT '状态 字典customer_followup_status',
`customer_id` bigint NULL DEFAULT NULL COMMENT '客户编号',
`offer_id` bigint NULL DEFAULT NULL COMMENT '报价单',
`follow_type` tinyint NULL DEFAULT NULL COMMENT '跟进类型 字典customer_followup_type',
`follow_time` datetime NULL DEFAULT NULL COMMENT '跟进时间',
`contact_name` varchar(63) NULL DEFAULT NULL COMMENT '联系人',
`follow_method` tinyint NULL DEFAULT NULL COMMENT '跟进方式 字典customer_followup_method',
`follow_user_id` bigint NULL DEFAULT NULL COMMENT '客户经理/跟进业务员id',
`purpose` varchar(512) NULL DEFAULT NULL COMMENT '目的',
`result_type` tinyint NULL DEFAULT NULL COMMENT '跟进结果 字典customer_followup_result_type',
`feedback` varchar(2048) NULL DEFAULT NULL COMMENT '客户反馈',
`attatchment` varchar(2048) NULL DEFAULT NULL COMMENT '附件 多个以逗号分隔',
`next_time` datetime NULL DEFAULT NULL COMMENT '下次跟进时间',
`next_plan` varchar(2048) NULL DEFAULT NULL COMMENT '下次跟进计划',
`creator` varchar(63) NOT NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updater` varchar(63) NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
PRIMARY KEY (`id`)
) ENGINE = InnoDB AUTO_INCREMENT = 1 COMMENT = '客户跟进表';
-- 下面为刷新数据的sql
-- 更新客户角色
update ecw_customer set roles = '2' where FIND_IN_SET(2, type) != 0;
update ecw_customer set roles = '3' where FIND_IN_SET(3, type) != 0;
......@@ -96,3 +134,15 @@ update ecw_customer a
set a.customer_service_confirmed_time = b.maxtime
where a.deleted = 0;
-- 刷新客户跟进数据
insert into ecw_customer_followup(id, number, parent_number, `status`, customer_id, offer_id, follow_type, follow_time, contact_name,
follow_method, follow_user_id, purpose, result_type, feedback, attatchment,
next_time, next_plan, creator, create_time, updater, update_time, deleted)
select null, null, null, 1, customer_id, null, 1, follow_time, contact_name, follow_method, follow_user_id, null, 1,
CONCAT('【客户反馈:】\r\n', feedback, '\r\n\r\n【处理结果:】\r\n', result),
null, null, null, creator, create_time, updater, update_time, deleted
from ecw_customer_follow;
-- 更新客户跟进编号
update ecw_customer_followup set number = CONCAT('GJ', 2024000000 + id);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment