作者 李宇航

合并分支 'lyh-server' 到 'master'

变更数据



查看合并请求 !2987
@@ -66,12 +66,12 @@ class GeoCount extends Command @@ -66,12 +66,12 @@ class GeoCount extends Command
66 $platforms = ['gemini','openai','deepseek','poe','perplexity','google_ai_overview','openai-not-network','claude']; 66 $platforms = ['gemini','openai','deepseek','poe','perplexity','google_ai_overview','openai-not-network','claude'];
67 foreach ($project_id as $item){ 67 foreach ($project_id as $item){
68 $projectModel = new Project(); 68 $projectModel = new Project();
69 - $geo_qualify_day = $projectModel->getValue(['id'=>$item],'geo_qualify_day'); 69 + $geo_qualify_num = $projectModel->getValue(['id'=>$item],'geo_qualify_num');
70 $this->output('执行的项目ID----'.$item); 70 $this->output('执行的项目ID----'.$item);
71 //收录总数 71 //收录总数
72 $total = $geoQuestionResModel->counts(['project_id' => $item,'hit'=>['!=',0],'created_at' => ['between',[$start,$end]]]); 72 $total = $geoQuestionResModel->counts(['project_id' => $item,'hit'=>['!=',0],'created_at' => ['between',[$start,$end]]]);
73 $qualify_total = $geoQuestionResModel->counts(['platform'=>['in',['openai', 'gemini','google_ai_overview']],'project_id' => $item,'hit'=>['!=',0],'created_at' => ['between',[$start,$end]]]); 73 $qualify_total = $geoQuestionResModel->counts(['platform'=>['in',['openai', 'gemini','google_ai_overview']],'project_id' => $item,'hit'=>['!=',0],'created_at' => ['between',[$start,$end]]]);
74 - if($qualify_total > $geo_qualify_day){ 74 + if($qualify_total > $geo_qualify_num){
75 $is_qualify = 1; 75 $is_qualify = 1;
76 } 76 }
77 $data = [ 77 $data = [
@@ -70,12 +70,12 @@ class GeoCountAll extends Command @@ -70,12 +70,12 @@ class GeoCountAll extends Command
70 $platforms = ['gemini','openai','deepseek','poe','perplexity','google_ai_overview','openai-not-network','claude']; 70 $platforms = ['gemini','openai','deepseek','poe','perplexity','google_ai_overview','openai-not-network','claude'];
71 foreach ($project_id as $item){ 71 foreach ($project_id as $item){
72 $projectModel = new Project(); 72 $projectModel = new Project();
73 - $geo_qualify_day = $projectModel->getValue(['id'=>$item],'geo_qualify_day'); 73 + $geo_qualify_num = $projectModel->getValue(['id'=>$item],'geo_qualify_num');
74 $this->output('执行的项目ID----'.$item); 74 $this->output('执行的项目ID----'.$item);
75 //收录总数 75 //收录总数
76 $total = $geoQuestionResModel->counts(['project_id' => $item,'hit'=>['!=',0],'created_at' => ['between',[$start,$end]]]); 76 $total = $geoQuestionResModel->counts(['project_id' => $item,'hit'=>['!=',0],'created_at' => ['between',[$start,$end]]]);
77 $qualify_total = $geoQuestionResModel->counts(['platform'=>['in',['openai', 'gemini','google_ai_overview']],'project_id' => $item,'hit'=>['!=',0],'created_at' => ['between',[$start,$end]]]); 77 $qualify_total = $geoQuestionResModel->counts(['platform'=>['in',['openai', 'gemini','google_ai_overview']],'project_id' => $item,'hit'=>['!=',0],'created_at' => ['between',[$start,$end]]]);
78 - if($total > $geo_qualify_day){ 78 + if($total > $geo_qualify_num){
79 $is_qualify = 1; 79 $is_qualify = 1;
80 } 80 }
81 $data = [ 81 $data = [
@@ -129,7 +129,7 @@ class CountLogic extends BaseLogic @@ -129,7 +129,7 @@ class CountLogic extends BaseLogic
129 $geoInfo = $geoCountModel->where('project_id',$this->user['project_id'])->where('date', '<=', date('Y-m-d'))->orderBy('date', 'desc')->first(); 129 $geoInfo = $geoCountModel->where('project_id',$this->user['project_id'])->where('date', '<=', date('Y-m-d'))->orderBy('date', 'desc')->first();
130 $geoInfo = $geoInfo ? $geoInfo->toArray() : []; 130 $geoInfo = $geoInfo ? $geoInfo->toArray() : [];
131 $data['geo_qualify_total'] = $geoInfo['qualify_total'] ?? 0; 131 $data['geo_qualify_total'] = $geoInfo['qualify_total'] ?? 0;
132 - $data['total_count'] = ($this->project['deploy_build']['keyword_num'] ?? 0) + ($this->project['geo_qualify_day'] ?? 0); 132 + $data['total_count'] = ($this->project['deploy_build']['keyword_num'] ?? 0) + ($this->project['geo_qualify_num'] ?? 0);
133 } 133 }
134 return $this->success($data); 134 return $this->success($data);
135 } 135 }