1 Star 0 Fork 16

bbhkxd/robotphp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
话术迁移.txt 9.33 KB
一键复制 编辑 原始数据 按行查看 历史
迁移话术数据
1 、 autodialer_speech 将话术id( 22 ) 对应的 user_id 进行修改 -- 277 改成 296,找到这条数据的industry_id = 41
update autodialer_speech set user_id = 296 where user_id = 227;
2、 autodialer_speech_rule 找到talk_temp_id = 41 的,将user_id 都从 277 改成 296
update autodialer_speech_rule set user_id = 296,update_time = 1683534398 where talk_temp_id = 41;
3、 autodialer_speech_process_node_children 表,找到talk_temp_id = 41 的,将user_id 都从 277 改成 296
update autodialer_speech_process_node_children set user_id = 296,update_time = 1683534398 where talk_temp_id = 41;
4、 autodialer_speech_process_node_line
5、 autodialer_speech_process_node_relation
6、 autodialer_speech_process_node_setting
7、 autodialer_speech_process_node_setting
8、 autodialer_speech_process_small_node_relation
-------------------------------------------------------
SELECT * FROM `autodialer_speech_process` WHERE `process_id` = '81' LIMIT 1
================================
添加话术 - 初始化
第一步 - speech/speech_add --- /Speech/Speech/addSpeech 插入 autodialer_speech 表 , 得到 speech_id
第二步 - 从autodialer_global_speech 中读取默认的参数,插入数据,关联 speech_id 和 user_id , 得到一个 插入id , gid
第三步 - 判断? 关联 autodialer_speech_global_answer 表,插入数据,关联speech_id 和 user_id
第四步 - 判断? 关联 autodialer_speech_global_keyword 表,插入数据,关联 speech_id 和 user_id
第五步,关联 autodialer_speech_distribution 表,将speech_id 取名为 talk_temp_id 插入 autodialer_speech_distribution 表
第二步 更新数据
添加一个节点 , flow/flow_add --- addFlowData , 插入 autodialer_speech_process 表数据 ,得到process_id
流程tab - 点击提交 - 触发 node/node_save ,/Speech/Node/saveNodeOperator,多伦会话 /Speech/NodeMul/saveNodeOperator
插入 autodialer_speech_process_node 表数据 ,做法是先全部删除,再重新插入,遍历前端传过来的 arr(节点数据)
array(1) {
[0]=>
array(8) {
["typeId"]=>
int(1)
["type"]=>
string(9) "vue-shape"
["nodeId"]=>
string(36) "339c99b4-2cfc-4bf9-9d1b-fd01f02ba096"
["x"]=>
int(360)
["y"]=>
int(194)
["zIndex"]=>
int(1)
["nodeData"]=>
array(3) {
["title"]=>
string(12) "普通节点"
["content"]=>
string(69) "对方的客服好的发电恢发来的多发点福利都发都发了"
["active"]=>
bool(false)
}
["children"]=>
array(4) {
[0]=>
array(1) {
["nodeId"]=>
string(36) "561047de-83ef-44bb-a6da-5d87af9faafa"
}
[1]=>
array(1) {
["nodeId"]=>
string(36) "e0565649-037a-40f6-affa-0d0a64be8304"
}
[2]=>
array(1) {
["nodeId"]=>
string(36) "a3822209-116c-4d61-b1c0-ebe28c576469"
}
[3]=>
array(1) {
["nodeId"]=>
string(36) "ac7803d9-bed5-4c4e-8ece-29e67182d1f7"
}
}
}
}
依次插入数据 , autodialer_speech_process_node 表 , 一个节点一条数据,关联 speech_id 和 process_id , user_id
插入大小节点关系表 autodialer_speech_process_small_node_relation , 关联 speech_id , process_id , user_id
录音 -- autodialer_speech_node_wav 表,关联user_id
asr配置,关联 autodialer_speech_asr 表
设置 - 关联。autodialer_speech 表
意向标签 -
===========================================
迁移话术
1、话术主表 - autodialer_speech , talk_temp_id = 话术id
2、流程 - 左侧流程表(开场白、业务介绍、) - 对应表 - autodialer_speech_process, talk_temp_id = 话术id
3、每个流程下的节点数据,对应表 - autodialer_speech_process_node , 关联process_id
4、节点之间的关联数据 , 对应表 - autodialer_speech_process_node_children
5、上下级关系数据,对应表 - autodialer_speech_process_node_line
6、autodialer_speech_process_node_relation
7、autodialer_speech_process_node_tree
知识库
8、autodialer_speech_technology_category ,talk_temp_id
9、autodialer_speech_technology_category_info
多轮会话
10、autodialer_speech_rule 表
11、autodialer_speech_mul_process_node 表
总结,只要把autodialer_speech_* 开头的表,全部找到user_id ,更新一遍,即可
比如,要把 scrmzs 账号(账号id 为 【277】) 的话术 装饰( 话术id-42 )迁移到 c0508 账号( 账号id 为 【296】)下
涉及的表有( talk_temp_id = 42 , industry_id = 10 )
update autodialer_speech set user_id = 296 , update_time = 1684394664 where user_id = 277 and talk_temp_id = 42;
update autodialer_speech_asr set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_condition_rule set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_distribution set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_examine set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_global_answer set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_global_keyword set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_global_setting set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_label_synonym set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_mul_label_synonym set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_mul_node_wav set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_mul_process_node set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_mul_process_node_children set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_mul_process_node_line set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_mul_process_node_relation set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_mul_process_node_setting set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_mul_process_node_tree set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_mul_process_small_node_relation set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_node_wav set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_process_node set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_process_node_children set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_process_node_line set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_process_node_relation set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_process_node_setting set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_process_node_tree set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_process_small_node_relation set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_rule set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_tech_wav set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_technology_answer set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_technology_answer_mul_process set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_technology_category set admin_id = 296 , update_time = 1684394664 where admin_id = 277;
update autodialer_speech_technology_category_info set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_technology_keyword set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_technology_setting set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_speech_technology_setting set user_id = 296 , update_time = 1684394664 where user_id = 277;
===============新发现============
update autodialer_examine_speech_global_setting set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_examine_speech_mul_process_node_setting set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_examine_speech_process_node_setting set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_examine_speech_technology_setting set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_global_speech set user_id = 296 , update_time = 1684394664 where user_id = 277;
update autodialer_global_speech_wav set user_id = 296 , update_time = 1684394664 where user_id = 277;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/bbhkxd/robotphp.git
git@gitee.com:bbhkxd/robotphp.git
bbhkxd
robotphp
robotphp
master

搜索帮助