|
...
|
...
|
@@ -9,6 +9,7 @@ |
|
|
|
|
|
|
|
namespace App\Http\Logic\Bside\Geo;
|
|
|
|
|
|
|
|
use App\Console\Commands\Geo\GeoQuestionRes;
|
|
|
|
use App\Http\Logic\Bside\BaseLogic;
|
|
|
|
use App\Models\Geo\GeoPlatform;
|
|
|
|
use App\Models\Geo\GeoQuestion;
|
|
...
|
...
|
@@ -98,7 +99,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 GeoQuestionRes();
|
|
|
|
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 +142,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)
|
|
|
|
->select(DB::raw('COUNT(DISTINCT question) as total'))
|
|
|
|
->value('total');
|
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -164,11 +171,6 @@ class GeoQuestionResLogic extends BaseLogic |
|
|
|
$data[$item['name']] = $questionResModel->counts(['project_id'=>$this->user['project_id'],'hit'=>['!=',0],'platform'=>$item['en_name']]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$data['question_count'] = $questionResModel->where('project_id', $this->user['project_id'])
|
|
|
|
->select(DB::raw('COUNT(DISTINCT question) as total'))
|
|
|
|
->value('total');
|
|
|
|
//问题达标数据
|
|
|
|
$data['question_qualify_count'] = $questionResModel->where('project_id', $this->user['project_id'])->where('hit','!=',0)->count();
|
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|