作者 刘锟

update

@@ -49,7 +49,7 @@ class Temp extends Command @@ -49,7 +49,7 @@ class Temp extends Command
49 49
50 public function handle() 50 public function handle()
51 { 51 {
52 - $this->inquiryAiCheck(17259, 27450); 52 + $this->inquiryAiCheck(17259, 17261);
53 } 53 }
54 54
55 /** 55 /**
@@ -87,13 +87,16 @@ class Temp extends Command @@ -87,13 +87,16 @@ class Temp extends Command
87 //关键词查询项目着陆页:先精准匹配,没有数据再全文索引匹配 87 //关键词查询项目着陆页:先精准匹配,没有数据再全文索引匹配
88 $inquiryForwardLogic = new InquiryForwardLogic(); 88 $inquiryForwardLogic = new InquiryForwardLogic();
89 $forward_list = $inquiryForwardLogic->searchKeywords($ai_keyword, 2, 3); 89 $forward_list = $inquiryForwardLogic->searchKeywords($ai_keyword, 2, 3);
90 - if (empty($forward_list)) {  
91 - $forward_list = $inquiryForwardLogic->searchKeywords($ai_keyword, 1, 3);  
92 - if (empty($forward_list)) {  
93 - $this->output('询盘ID:' . $inquiry['id'] . ',根据关键词[' . $ai_keyword . ']查询项目着陆页为空');  
94 - continue; 90 + if (count($forward_list) < 3) {
  91 + $forward_list_against = $inquiryForwardLogic->searchKeywords($ai_keyword, 1, 3 - count($forward_list));
  92 + foreach ($forward_list_against as $against) {
  93 + array_push($forward_list, $against);
95 } 94 }
96 } 95 }
  96 + if (empty($ai_message_list)) {
  97 + $this->output('询盘ID:' . $inquiry['id'] . ',AI重写询盘内容失败');
  98 + continue;
  99 + }
97 100
98 //重写询盘内容 101 //重写询盘内容
99 $ai_message_list = []; 102 $ai_message_list = [];