异常订单数据设计
第三版异常订单的设计比以往大了很多
集主单、岗位调查、调查物品、定责、优化事项、满意度回访、操作日志等功能。
CREATE TABLE `oa_yw_order_feedback_custom` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`order_id` int(11) NOT NULL DEFAULT '0' COMMENT '[订单ID]',
`consult_no` varchar(250) NOT NULL DEFAULT '' COMMENT '[咨询编号]',
`order_no` varchar(255) NOT NULL DEFAULT '' COMMENT '[订单号]',
`intention_id` int(10) NOT NULL DEFAULT '0' COMMENT '[意向ID]',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '[添加时间]',
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '[更新时间]',
`deleted_at` int(11) NOT NULL DEFAULT '0' COMMENT '[删除时间]',
`operation_id` int(11) NOT NULL DEFAULT '0' COMMENT '[录入人]',
`is_old_system` tinyint(1) NOT NULL DEFAULT '0' COMMENT '[是否老系统订单]?0=不是&1=是',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '[姓名]',
`content` text COMMENT '[事项]',
`phone` varchar(255) NOT NULL DEFAULT '' COMMENT '[电话]',
`appeal` text COMMENT '[诉求]',
`source` tinyint(3) NOT NULL DEFAULT '0' COMMENT '[来源]?1=企微客服&2=公众号客服&3=小海企微&4=小红书矩阵号&5=售中服务群&6=400电话&7=销售人员&8=跟单人员&9=仓库人员&10=满意度回访',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '[状态]?0=待分配&1=已分配&2=已作废',
`invalid_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '[作废类型]?1=非我司订单&2=客户误操作&3=其他',
`invalid_remark` text COMMENT '[作废原因]',
`work_id` int(11) NOT NULL DEFAULT '0' COMMENT '[工单ID]',
`all_level` tinyint(3) NOT NULL DEFAULT '0' COMMENT '[综合级别]?0=未设置&1=低风险&2=中风险&3=高风险',
`law_level` tinyint(3) NOT NULL DEFAULT '0' COMMENT '[法律风险]?0=未设置&1=低风险&2=中风险&3=高风险',
`brand_level` tinyint(3) NOT NULL DEFAULT '0' COMMENT '[品牌影响]?0=未设置&1=低风险&2=中风险&3=高风险',
`money_level` tinyint(3) NOT NULL DEFAULT '0' COMMENT '[经济损失]?0=未设置&1=低风险&2=中风险&3=高风险',
`solve_level` tinyint(3) NOT NULL DEFAULT '0' COMMENT '[解决难度]?0=未设置&1=低风险&2=中风险&3=高风险',
`is_add` tinyint(1) NOT NULL DEFAULT '0' COMMENT '[是否内部录入]?0=不是&1=是',
`is_post_add` tinyint(1) NOT NULL DEFAULT '0' COMMENT '[是否岗位录入]?0=不是&1=是',
`feedback_file_ids` varchar(255) NOT NULL DEFAULT '' COMMENT '[客户附件]',
`is_claim_add` tinyint(1) NOT NULL DEFAULT '0' COMMENT '[是否通过索赔功能创建]?0=不是&1=是',
PRIMARY KEY (`id`) USING BTREE,
KEY `created_at` (`created_at`) USING BTREE,
KEY `order_id` (`order_id`) USING BTREE,
KEY `consult_no` (`consult_no`) USING BTREE,
KEY `order_no` (`order_no`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=144 DEFAULT CHARSET=utf8mb4 COMMENT='客户反馈表';
CREATE TABLE `oa_yw_order_feedback_after_sales` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`order_id` int(11) NOT NULL DEFAULT '0' COMMENT '[订单ID]',
`consult_no` varchar(250) NOT NULL DEFAULT '' COMMENT '[咨询编号]',
`order_no` varchar(255) NOT NULL DEFAULT '' COMMENT '[订单号]',
`intention_id` int(10) NOT NULL DEFAULT '0' COMMENT '[意向ID]',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '[添加时间]',
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '[更新时间]',
`deleted_at` int(11) NOT NULL DEFAULT '0' COMMENT '[删除时间]',
`status` tinyint(3) NOT NULL DEFAULT '0' COMMENT '[状态]?0=待回访&1=待激活&2=已回访',
`score` tinyint(3) NOT NULL DEFAULT '0' COMMENT '[评分]',
`score_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '[回访结果]?1=可优化(5-7分)&2=不满意(≤4分)&3=不清晰&4=满意(≥8分)',
`next_follow_time` varchar(20) NOT NULL DEFAULT '' COMMENT '[下次回访时间]',
`is_feedback` tinyint(1) NOT NULL DEFAULT '0' COMMENT '[是否反馈问题]?0=否&1=是',
`goods_remark` text COMMENT '[好评原因]',
`follow_remark` text COMMENT '[跟进记录]',
`follow_file_ids` varchar(255) NOT NULL DEFAULT '' COMMENT '[跟进文件]',
`custom_id` int(11) NOT NULL DEFAULT '0' COMMENT '[客诉ID]',
`work_id` int(11) NOT NULL DEFAULT '0' COMMENT '[工单ID]',
`first_follow_time` varchar(20) NOT NULL DEFAULT '' COMMENT '[首次跟进时间]',
PRIMARY KEY (`id`) USING BTREE,
KEY `created_at` (`created_at`),
KEY `order_id` (`order_id`),
KEY `consult_no` (`consult_no`),
KEY `order_no` (`order_no`)
) ENGINE=InnoDB AUTO_INCREMENT=683 DEFAULT CHARSET=utf8 COMMENT='订单售后回访表';
CREATE TABLE `oa_yw_order_feedback_cate` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`operation_id` int(11) NOT NULL DEFAULT '0' COMMENT '[录入人]',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '[添加时间]',
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '[更新时间]',
`deleted_at` int(11) NOT NULL DEFAULT '0' COMMENT '[删除时间]',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '[分类名称]',
`alias` varchar(255) NOT NULL DEFAULT '' COMMENT '[别名]',
`parent_id` int(11) NOT NULL DEFAULT '0' COMMENT '[上级ID]',
`children_ids` text COMMENT '[下级集合]',
`level` tinyint(3) NOT NULL DEFAULT '0' COMMENT '[级别]',
`desc` text COMMENT '[说明]',
`all_level` tinyint(3) NOT NULL DEFAULT '0' COMMENT '[综合级别]?1=低风险&2=中风险&3=高风险',
`law_level` tinyint(3) NOT NULL DEFAULT '0' COMMENT '[法律风险]?1=低风险&2=中风险&3=高风险',
`brand_level` tinyint(3) NOT NULL DEFAULT '0' COMMENT '[品牌影响]?1=低风险&2=中风险&3=高风险',
`money_level` tinyint(3) NOT NULL DEFAULT '0' COMMENT '[经济损失]?1=低风险&2=中风险&3=高风险',
`solve_level` tinyint(3) NOT NULL DEFAULT '0' COMMENT '[解决难度]?1=低风险&2=中风险&3=高风险',
`sorts` int(11) NOT NULL DEFAULT '0' COMMENT '[排序值]',
`main_post` varchar(255) NOT NULL DEFAULT '' COMMENT '[主职责岗位]',
`help_post` varchar(255) NOT NULL DEFAULT '' COMMENT '[协助岗位]',
`main_target` int(11) NOT NULL DEFAULT '0' COMMENT '[客户端结束目标]',
`kf_target` int(11) NOT NULL DEFAULT '0' COMMENT '[客服结项目标]',
`gd_target` int(11) NOT NULL DEFAULT '0' COMMENT '[跟单结项目标]',
`ck_target` int(11) NOT NULL DEFAULT '0' COMMENT '[仓库结项目标]',
`pz_target` int(11) NOT NULL DEFAULT '0' COMMENT '[品质结项目标]',
`all_check_target` int(11) NOT NULL DEFAULT '0' COMMENT '[联合调查结项目标]',
`kf_judge` int(11) NOT NULL DEFAULT '0' COMMENT '[客服定责时限]',
`gd_judge` int(11) NOT NULL DEFAULT '0' COMMENT '[跟单定责时限]',
`ck_judge` int(11) NOT NULL DEFAULT '0' COMMENT '[仓库定责时限]',
`kf_check` int(11) NOT NULL DEFAULT '1' COMMENT '[客服调查目标]',
`gd_check` int(11) NOT NULL DEFAULT '1' COMMENT '[跟单调查目标]',
`ck_check` int(11) NOT NULL DEFAULT '1' COMMENT '[仓库调查目标]',
`pz_check` int(11) NOT NULL DEFAULT '1' COMMENT '[品管调查目标]',
PRIMARY KEY (`id`) USING BTREE,
KEY `created_at` (`created_at`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=utf8mb4 COMMENT='反馈类型表';
CREATE TABLE `oa_yw_order_feedback_deal` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`order_id` int(11) NOT NULL DEFAULT '0' COMMENT '[订单ID]',
`consult_no` varchar(250) NOT NULL DEFAULT '' COMMENT '[咨询编号]',
`order_no` varchar(255) NOT NULL DEFAULT '' COMMENT '[订单号]',
`intention_id` int(10) NOT NULL DEFAULT '0' COMMENT '[意向ID]',
`operation_id` int(11) NOT NULL DEFAULT '0' COMMENT '[录入人]',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '[添加时间]',
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '[更新时间]',
`deleted_at` int(11) NOT NULL DEFAULT '0' COMMENT '[删除时间]',
`start_time` varchar(20) NOT NULL DEFAULT '' COMMENT '[开始处理时间]',
`admin_id` int(11) NOT NULL DEFAULT '0' COMMENT '[责任人]',
`custom_id` int(11) NOT NULL DEFAULT '0' COMMENT '[客诉ID]',
`work_id` int(11) NOT NULL DEFAULT '0' COMMENT '[工单ID]',
`status` tinyint(3) NOT NULL DEFAULT '0' COMMENT '[状态]?0=待处理&1=已处理&2=已结案',
`finish_time` varchar(20) NOT NULL DEFAULT '' COMMENT '[完成时间]',
`limit_time` varchar(20) NOT NULL DEFAULT '' COMMENT '[限制时间]',
`post` varchar(255) NOT NULL DEFAULT '' COMMENT '[岗位]?kf=客服&gd=跟单&ck=仓库&pz=品质',
`target` int(11) NOT NULL DEFAULT '0' COMMENT '[目标]',
`is_need_check` tinyint(1) NOT NULL DEFAULT '0' COMMENT '[是否需要调查]?0=不是&1=是',
`check_version` tinyint(3) NOT NULL DEFAULT '0' COMMENT '[调查版本]?0=通版&1=丢失版&2=损坏版',
`is_reasonable` tinyint(1) NOT NULL DEFAULT '0' COMMENT '[是否合理]?0=未选择&1=合理&2=不合理',
`reasonable_remark` text COMMENT '[不合理原因]',
`pinzhi_remark` text COMMENT '[指派需求描述]',
`post_remark` text COMMENT '[诉求解决意见]',
`reasonable_file_ids` varchar(255) NOT NULL DEFAULT '' COMMENT '[举证附件]',
`custom_file_ids` varchar(255) NOT NULL DEFAULT '' COMMENT '[客户补充附件]',
`finish_file_ids` varchar(255) NOT NULL DEFAULT '' COMMENT '[结案文件]',
`finish_remark` text COMMENT '[结案备注]',
`judge_who` tinyint(1) NOT NULL DEFAULT '0' COMMENT '[责任意见]?1=销售&2=跟单&3=代理&4=仓库&5=不可抗力&6=未知',
`revoke_admin_id` int(11) NOT NULL DEFAULT '0' COMMENT '[撤回人]',
`revoke_time` varchar(20) NOT NULL DEFAULT '' COMMENT '[撤回时间]',
`revoke_remark` text COMMENT '[撤回原因]',
`stop_check_admin_id` int(11) NOT NULL DEFAULT '0' COMMENT '[中断调查人]',
`stop_check_time` varchar(20) NOT NULL DEFAULT '' COMMENT '[中断调查时间]',
`stop_check_remark` text COMMENT '[中断原因]',
PRIMARY KEY (`id`) USING BTREE,
KEY `created_at` (`created_at`) USING BTREE,
KEY `order_id` (`order_id`) USING BTREE,
KEY `consult_no` (`consult_no`) USING BTREE,
KEY `order_no` (`order_no`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=294 DEFAULT CHARSET=utf8mb4 COMMENT='客诉岗位处理表';
CREATE TABLE `oa_yw_order_feedback_duty` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`order_id` int(11) NOT NULL DEFAULT '0' COMMENT '[订单ID]',
`consult_no` varchar(250) NOT NULL DEFAULT '' COMMENT '[咨询编号]',
`order_no` varchar(255) NOT NULL DEFAULT '' COMMENT '[订单号]',
`intention_id` int(10) NOT NULL DEFAULT '0' COMMENT '[意向ID]',
`operation_id` int(11) NOT NULL DEFAULT '0' COMMENT '[录入人]',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '[添加时间]',
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '[更新时间]',
`deleted_at` int(11) NOT NULL DEFAULT '0' COMMENT '[删除时间]',
`is_old_system` tinyint(1) NOT NULL DEFAULT '0' COMMENT '[是否老系统订单]?0=不是&1=是',
`custom_id` int(11) NOT NULL DEFAULT '0' COMMENT '[客诉ID]',
`work_id` int(11) NOT NULL DEFAULT '0' COMMENT '[工单ID]',
`admin_id` int(11) NOT NULL DEFAULT '0' COMMENT '[问责任ID]',
`item` varchar(255) NOT NULL DEFAULT '' COMMENT '[问责事项]?1=指正&2=扣分&3=经济处罚&4=通报',
PRIMARY KEY (`id`) USING BTREE,
KEY `created_at` (`created_at`) USING BTREE,
KEY `order_id` (`order_id`) USING BTREE,
KEY `consult_no` (`consult_no`) USING BTREE,
KEY `order_no` (`order_no`) USING BTREE,
KEY `custom_id` (`custom_id`) USING BTREE,
KEY `work_id` (`work_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='客诉问责表';
CREATE TABLE `oa_yw_order_feedback_follow` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`order_id` int(11) NOT NULL DEFAULT '0' COMMENT '[订单ID]',
`consult_no` varchar(250) NOT NULL DEFAULT '' COMMENT '[咨询编号]',
`order_no` varchar(255) NOT NULL DEFAULT '' COMMENT '[订单号]',
`intention_id` int(10) NOT NULL DEFAULT '0' COMMENT '[意向ID]',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '[添加时间]',
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '[更新时间]',
`deleted_at` int(11) NOT NULL DEFAULT '0' COMMENT '[删除时间]',
`operation_id` int(11) NOT NULL DEFAULT '0' COMMENT '[操作人ID]',
`custom_id` int(11) NOT NULL DEFAULT '0' COMMENT '[客诉ID]',
`work_id` int(11) NOT NULL DEFAULT '0' COMMENT '[工单ID]',
`content` text COMMENT '[内容]',
`file_ids` varchar(255) NOT NULL DEFAULT '' COMMENT '[文件ID]',
`is_need_help` tinyint(1) NOT NULL DEFAULT '0' COMMENT '[是否需要帮扶]?0=不是&1=是',
`help_remark` text COMMENT '[帮扶信息]',
`difficult_remark` text COMMENT '[卡点信息]',
PRIMARY KEY (`id`) USING BTREE,
KEY `created_at` (`created_at`) USING BTREE,
KEY `order_id` (`order_id`) USING BTREE,
KEY `consult_no` (`consult_no`) USING BTREE,
KEY `order_no` (`order_no`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=262 DEFAULT CHARSET=utf8mb4 COMMENT='反馈跟进表';
2025-12-12
浏览16
登录后评论
评论
分享