作者 李宇航

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

变更数据



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