|
...
|
...
|
@@ -11,6 +11,7 @@ namespace App\Console\Commands\Geo; |
|
|
|
|
|
|
|
use App\Models\Geo\GeoQuestionLog;
|
|
|
|
use App\Models\Geo\GeoQuestionResult;
|
|
|
|
use App\Models\Project\Project;
|
|
|
|
use Illuminate\Console\Command;
|
|
|
|
use Illuminate\Support\Carbon;
|
|
|
|
use App\Models\Geo\GeoCount as GeoCountModel;
|
|
...
|
...
|
@@ -61,18 +62,24 @@ class GeoCount extends Command |
|
|
|
if(empty($project_id)){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
$projectModel = new Project();
|
|
|
|
$geo_qualify_day = $projectModel->getValue(['id'=>$project_id],['geo_qualify_day']);
|
|
|
|
$geoQuestionResModel = new GeoQuestionResult();
|
|
|
|
$platforms = ['gemini','openai','deepseek','poe','perplexity','google_ai_overview','openai-not-network','claude'];
|
|
|
|
foreach ($project_id as $item){
|
|
|
|
$this->output('执行的项目ID----'.$item);
|
|
|
|
//收录总数
|
|
|
|
$total = $geoQuestionResModel->counts(['project_id' => $item,'hit'=>['!=',0],'created_at' => ['between',[$start,$end]]]);
|
|
|
|
if($total > $geo_qualify_day){
|
|
|
|
$is_qualify = 1;
|
|
|
|
}
|
|
|
|
$data = [
|
|
|
|
'project_id' => $item,
|
|
|
|
'date' => $date,
|
|
|
|
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
|
|
|
|
'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),
|
|
|
|
'total'=>$total,//收录总数
|
|
|
|
'is_qualify'=>$is_qualify,
|
|
|
|
];
|
|
|
|
foreach ($platforms as $platform){
|
|
|
|
if($platform == 'openai-not-network'){
|
...
|
...
|
|