|
...
|
...
|
@@ -98,7 +98,7 @@ class GeoQuestionResLogic extends BaseLogic |
|
|
|
$list = $questionModel->list(['project_id'=>$this->user['project_id']],['question','keywords','url']);
|
|
|
|
$core_question_count = $questionTotalCount = $urlTotalCount = $keywordsTotalCount = 0;
|
|
|
|
$keywordArr = [];
|
|
|
|
$questionLogModel = new GeoQuestionLog();
|
|
|
|
$questionLogModel = new GeoQuestionResult();
|
|
|
|
if($this->user['project_id'] == 4533){
|
|
|
|
$keywordUrlCount = $questionLogModel->counts(['project_id'=>$this->user['project_id'],'is_match'=>1,'hit'=>['!=',0]]);
|
|
|
|
foreach ($list as $item){
|
|
...
|
...
|
@@ -141,8 +141,14 @@ class GeoQuestionResLogic extends BaseLogic |
|
|
|
'keywords_url_count'=>$keywordUrlCount,
|
|
|
|
'keywords_arr' => $keywordArr,
|
|
|
|
];
|
|
|
|
return $this->success($data);
|
|
|
|
|
|
|
|
}
|
|
|
|
//问题达标数据
|
|
|
|
$data['question_qualify_count'] = $questionLogModel->where('project_id', $this->user['project_id'])
|
|
|
|
->where('hit','!=',0)->whereIn('platform',['openai', 'gemini','google_ai_overview'])
|
|
|
|
->select(DB::raw('COUNT(DISTINCT question) as total'))
|
|
|
|
->value('total');
|
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -156,7 +162,7 @@ class GeoQuestionResLogic extends BaseLogic |
|
|
|
$data = [];
|
|
|
|
$platformModel = new GeoPlatform();
|
|
|
|
$list = $platformModel->list(['status'=>1],'id',['name','en_name']);
|
|
|
|
$questionResModel = new GeoQuestionLog();
|
|
|
|
$questionResModel = new GeoQuestionResult();
|
|
|
|
foreach ($list as $item){
|
|
|
|
if($this->user['project_id'] == 4533){
|
|
|
|
$data[$item['name']] = $questionResModel->counts(['project_id'=>$this->user['project_id'],'is_match'=>1,'hit'=>['!=',0],'platform'=>$item['en_name']]);
|
...
|
...
|
|