companyRepository = $companyRepository; $this->memberLogRepository = $memberLogRepository; $this->complaintConsultantRepository = $complaintConsultantRepository; } public function getCompanyConsultant($user, $input) { $id = $input['id']; $notes = $input['notes']; if(empty($id)){ throw new ResponseException('专属客服不存在!'); } if(empty($notes)){ throw new ResponseException('投诉说明不能为空!'); } return $this->complaintConsultantRepository->addData(['uid'=>$user->id,'consultant_id'=>$id,'notes'=>$notes]); } }