正在显示
1 个修改的文件
包含
3 行增加
和
0 行删除
| @@ -112,6 +112,9 @@ class GeoLogic extends BaseLogic | @@ -112,6 +112,9 @@ class GeoLogic extends BaseLogic | ||
| 112 | { | 112 | { |
| 113 | //获取问题数量 | 113 | //获取问题数量 |
| 114 | $geo_question_count = GeoQuestion::selectRaw('SUM(JSON_LENGTH(question)) as total_count')->where('project_id',$this->param['project_id'])->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 | + if(empty($geo_question_count)){ | ||
| 116 | + $geo_question_count = 0; | ||
| 117 | + } | ||
| 115 | $geo_pr_count = GeoLink::where('project_id',$this->param['project_id'])->count(); | 118 | $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(); | 119 | $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]); | 120 | return $this->success(['geo_writings_count'=>$geo_writings_count,'geo_pr_count'=>$geo_pr_count,'geo_question_count'=>$geo_question_count]); |
-
请 注册 或 登录 后发表评论