作者 lyh

gx

@@ -84,11 +84,10 @@ class GeoQuestionRes extends Command @@ -84,11 +84,10 @@ class GeoQuestionRes extends Command
84 GET_RESULT: 84 GET_RESULT:
85 $error_num++; 85 $error_num++;
86 try { 86 try {
87 - echo '执行次数:'.$error_num.PHP_EOL; 87 + echo '执行时间:'.date('Y-m-d H:i:s').'->执行次数:'.$error_num.',执行平台:'.$platform.PHP_EOL;
88 if ($error_num >= 3) { 88 if ($error_num >= 3) {
89 continue; 89 continue;
90 } 90 }
91 - echo '执行平台:'.$platform.PHP_EOL;  
92 if ($platform == 'Google AI Overview') { 91 if ($platform == 'Google AI Overview') {
93 // overview 数据结构不确定, 需要单独处理数据 92 // overview 数据结构不确定, 需要单独处理数据
94 $data = $geo_service->getGooglePlatformResult($question); 93 $data = $geo_service->getGooglePlatformResult($question);
@@ -125,7 +124,7 @@ class GeoQuestionRes extends Command @@ -125,7 +124,7 @@ class GeoQuestionRes extends Command
125 $hit++; 124 $hit++;
126 } 125 }
127 } 126 }
128 - echo 'MZ-url'.json_encode($hit_url).PHP_EOL; 127 + echo 'MZ-url->'.json_encode($hit_url).PHP_EOL;
129 // 保存数据结果 128 // 保存数据结果
130 $geo_result = $geoResultModel->read(['project_id' => $taskInfo['project_id'],'type' => $taskInfo['type'], 'question_id' => $task_id, 'platform' => $platform, 'question' => $question],['id']); 129 $geo_result = $geoResultModel->read(['project_id' => $taskInfo['project_id'],'type' => $taskInfo['type'], 'question_id' => $task_id, 'platform' => $platform, 'question' => $question],['id']);
131 $save_data = [ 130 $save_data = [
@@ -145,7 +144,6 @@ class GeoQuestionRes extends Command @@ -145,7 +144,6 @@ class GeoQuestionRes extends Command
145 // echo '当前数据INFO:'.json_encode($save_data,true).PHP_EOL; 144 // echo '当前数据INFO:'.json_encode($save_data,true).PHP_EOL;
146 if($geo_result === false){ 145 if($geo_result === false){
147 $id= $geoResultModel->insertGetId($save_data); 146 $id= $geoResultModel->insertGetId($save_data);
148 - echo '当前数据id:'.$id.PHP_EOL;  
149 }else{ 147 }else{
150 $geoResultModel->edit($save_data, ['id' => $geo_result['id']]); 148 $geoResultModel->edit($save_data, ['id' => $geo_result['id']]);
151 } 149 }