正在显示
1 个修改的文件
包含
9 行增加
和
7 行删除
| @@ -9,6 +9,7 @@ | @@ -9,6 +9,7 @@ | ||
| 9 | 9 | ||
| 10 | namespace App\Http\Logic\Bside\Geo; | 10 | namespace App\Http\Logic\Bside\Geo; |
| 11 | 11 | ||
| 12 | +use App\Console\Commands\Geo\GeoQuestionRes; | ||
| 12 | use App\Http\Logic\Bside\BaseLogic; | 13 | use App\Http\Logic\Bside\BaseLogic; |
| 13 | use App\Models\Geo\GeoPlatform; | 14 | use App\Models\Geo\GeoPlatform; |
| 14 | use App\Models\Geo\GeoQuestion; | 15 | use App\Models\Geo\GeoQuestion; |
| @@ -98,7 +99,7 @@ class GeoQuestionResLogic extends BaseLogic | @@ -98,7 +99,7 @@ class GeoQuestionResLogic extends BaseLogic | ||
| 98 | $list = $questionModel->list(['project_id'=>$this->user['project_id']],['question','keywords','url']); | 99 | $list = $questionModel->list(['project_id'=>$this->user['project_id']],['question','keywords','url']); |
| 99 | $core_question_count = $questionTotalCount = $urlTotalCount = $keywordsTotalCount = 0; | 100 | $core_question_count = $questionTotalCount = $urlTotalCount = $keywordsTotalCount = 0; |
| 100 | $keywordArr = []; | 101 | $keywordArr = []; |
| 101 | - $questionLogModel = new GeoQuestionLog(); | 102 | + $questionLogModel = new GeoQuestionRes(); |
| 102 | if($this->user['project_id'] == 4533){ | 103 | if($this->user['project_id'] == 4533){ |
| 103 | $keywordUrlCount = $questionLogModel->counts(['project_id'=>$this->user['project_id'],'is_match'=>1,'hit'=>['!=',0]]); | 104 | $keywordUrlCount = $questionLogModel->counts(['project_id'=>$this->user['project_id'],'is_match'=>1,'hit'=>['!=',0]]); |
| 104 | foreach ($list as $item){ | 105 | foreach ($list as $item){ |
| @@ -141,8 +142,14 @@ class GeoQuestionResLogic extends BaseLogic | @@ -141,8 +142,14 @@ class GeoQuestionResLogic extends BaseLogic | ||
| 141 | 'keywords_url_count'=>$keywordUrlCount, | 142 | 'keywords_url_count'=>$keywordUrlCount, |
| 142 | 'keywords_arr' => $keywordArr, | 143 | 'keywords_arr' => $keywordArr, |
| 143 | ]; | 144 | ]; |
| 144 | - return $this->success($data); | 145 | + |
| 145 | } | 146 | } |
| 147 | + //问题达标数据 | ||
| 148 | + $data['question_qualify_count'] = $questionLogModel->where('project_id', $this->user['project_id']) | ||
| 149 | + ->where('hit','!=',0) | ||
| 150 | + ->select(DB::raw('COUNT(DISTINCT question) as total')) | ||
| 151 | + ->value('total'); | ||
| 152 | + return $this->success($data); | ||
| 146 | } | 153 | } |
| 147 | 154 | ||
| 148 | /** | 155 | /** |
| @@ -164,11 +171,6 @@ class GeoQuestionResLogic extends BaseLogic | @@ -164,11 +171,6 @@ class GeoQuestionResLogic extends BaseLogic | ||
| 164 | $data[$item['name']] = $questionResModel->counts(['project_id'=>$this->user['project_id'],'hit'=>['!=',0],'platform'=>$item['en_name']]); | 171 | $data[$item['name']] = $questionResModel->counts(['project_id'=>$this->user['project_id'],'hit'=>['!=',0],'platform'=>$item['en_name']]); |
| 165 | } | 172 | } |
| 166 | } | 173 | } |
| 167 | - $data['question_count'] = $questionResModel->where('project_id', $this->user['project_id']) | ||
| 168 | - ->select(DB::raw('COUNT(DISTINCT question) as total')) | ||
| 169 | - ->value('total'); | ||
| 170 | - //问题达标数据 | ||
| 171 | - $data['question_qualify_count'] = $questionResModel->where('project_id', $this->user['project_id'])->where('hit','!=',0)->count(); | ||
| 172 | return $this->success($data); | 174 | return $this->success($data); |
| 173 | } | 175 | } |
| 174 | 176 |
-
请 注册 或 登录 后发表评论