作者 李宇航

合并分支 'lyh-server' 到 'master'

变更数据



查看合并请求 !3087
... ... @@ -78,6 +78,11 @@ class GeoController extends BaseController
*/
public function getCount()
{
$this->request->validate([
'project_id' => 'required',
], [
'project_id.required' => '项目ID不能为空',
]);
$data = $this->logic->getCount();
$this->response('success', Code::SUCCESS, $data);
}
... ...
... ... @@ -114,7 +114,7 @@ class GeoLogic extends BaseLogic
$geo_question_count = GeoQuestion::selectRaw('SUM(JSON_LENGTH(question)) as total_count')->value('total_count');
$geo_pr_count = GeoLink::where('project_id',$this->param['project_id'])->count();
$geo_writings_count = GeoWritings::where('project_id',$this->param['project_id'])->count();
return $this->success(['geo_writings_count'=>$geo_writings_count,'$geo_pr_count'=>$geo_pr_count,'geo_question_count'=>$geo_question_count]);
return $this->success(['geo_writings_count'=>$geo_writings_count,'geo_pr_count'=>$geo_pr_count,'geo_question_count'=>$geo_question_count]);
}
}
... ...