作者 李宇航

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

变更数据



查看合并请求 !3003
... ... @@ -34,9 +34,20 @@ class GeoQuestionResLogic extends BaseLogic
* @time :2025/7/8 17:16
*/
public function getCount(){
$total = $this->model->counts(['project_id'=>$this->user['project_id']]);
$type_1 = $this->model->counts(['type'=>$this->model::BRAND_TYPE,'project_id'=>$this->user['project_id']]);
$type_2 = $this->model->counts(['type'=>$this->model::MARKETING_TYPE,'project_id'=>$this->user['project_id']]);
$total = $this->model
->where('project_id', $this->user['project_id'])
->distinct('question')
->count('question');
$type_1 = $this->model
->where('type', $this->model::BRAND_TYPE)
->where('project_id', $this->user['project_id'])
->distinct('question')
->count('question');
$type_2 = $this->model
->where('type', $this->model::MARKETING_TYPE)
->where('project_id', $this->user['project_id'])
->distinct('question')
->count('question');
return $this->success(['total'=>$total,'type_1'=>$type_1,'type_2'=>$type_2]);
}
... ...