| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 | 
							- <?php
 
- /**
 
-  * Created by PhpStorm.
 
-  * User: wuzhenke
 
-  * Date: 2018/11/13
 
-  * Time: 17:44
 
-  */
 
- namespace App\Services\Company;
 
- use App\Exceptions\ResponseException;
 
- use App\Repositories\CompanyRepository;
 
- use App\Repositories\ComplaintConsultantRepository;
 
- use App\Repositories\MemberLogRepository;
 
- class ComplaintConsultantService
 
- {
 
-     protected $companyRepository;
 
-     protected $memberLogRepository;
 
-     protected $complaintConsultantRepository;
 
-     
 
-     /**
 
-      * CompanyImgService constructor.
 
-      * @param $companyImgRepository
 
-      * @param $companyRepository
 
-      * @param $taskService
 
-      * @param $memberLogRepository
 
-      */
 
-     public function __construct(MemberLogRepository $memberLogRepository, CompanyRepository $companyRepository, ComplaintConsultantRepository $complaintConsultantRepository)
 
-     {
 
-         $this->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]);
 
-     }
 
-     
 
-     
 
-     
 
- }
 
 
  |