作者 lyh

变更数据

@@ -111,7 +111,7 @@ class GeoLogic extends BaseLogic @@ -111,7 +111,7 @@ class GeoLogic extends BaseLogic
111 public function getCount() 111 public function getCount()
112 { 112 {
113 //获取问题数量 113 //获取问题数量
114 - $geo_question_count = GeoQuestion::selectRaw('SUM(JSON_LENGTH(question)) as total_count')->value('total_count'); 114 + $geo_question_count = GeoQuestion::selectRaw('SUM(JSON_LENGTH(question)) as total_count')->where('project_id',$this->param['project_id'])->value('total_count');
115 $geo_pr_count = GeoLink::where('project_id',$this->param['project_id'])->count(); 115 $geo_pr_count = GeoLink::where('project_id',$this->param['project_id'])->count();
116 $geo_writings_count = GeoWritings::where('project_id',$this->param['project_id'])->count(); 116 $geo_writings_count = GeoWritings::where('project_id',$this->param['project_id'])->count();
117 return $this->success(['geo_writings_count'=>$geo_writings_count,'geo_pr_count'=>$geo_pr_count,'geo_question_count'=>$geo_question_count]); 117 return $this->success(['geo_writings_count'=>$geo_writings_count,'geo_pr_count'=>$geo_pr_count,'geo_question_count'=>$geo_question_count]);