| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 | <?phpnamespace App\Services\Statistics;use App\Repositories\Jobfair\JobfairRepository;use App\Repositories\Jobfair\JobfairCompanyRepository;use App\Repositories\Jobfair\JobfairPutJobRepository;use App\Repositories\Jobfair\JobfairPersonSignedRepository;class JobfairService{    protected $jobfairRepository;    protected $jobfairCompanyRepository;    protected $jobfairPutJobRepository;    protected $jobfairPersonSignedRepository;    /**     * JobfairService constructor.     */    public function __construct(JobfairRepository $jobfairRepository,JobfairCompanyRepository $jobfairCompanyRepository, JobfairPutJobRepository $jobfairPutJobRepository, JobfairPersonSignedRepository $jobfairPersonSignedRepository)    {        $this->jobfairRepository             = $jobfairRepository;        $this->jobfairCompanyRepository      = $jobfairCompanyRepository;        $this->jobfairPutJobRepository       = $jobfairPutJobRepository;        $this->jobfairPersonSignedRepository = $jobfairPersonSignedRepository;    }    public function getJobfairNum($where)    {        return $this->jobfairRepository->getJobfairNum($where);    }    public function getJobfairVisitorNum($where = [])    {        return $this->jobfairPersonSignedRepository->getJobfairVisitorNum($where);    }    public function getJobfairIds($where)    {        $rst = $this->jobfairRepository->getStatisticsJobfairs($where);        return $rst->pluck('id')->toArray();    }    public function getCompanyCount($where, $whereIn)    {        return $this->jobfairCompanyRepository->getStatisticsCompanyCount($where, $whereIn);    }    public function getJobsCount($where, $whereIn)    {        return $this->jobfairPutJobRepository->getStatisticsJobCount($where, $whereIn);    }    public function getJobsAmount($where, $whereIn)    {        return $this->jobfairPutJobRepository->getStatisticsJobAmount($where, $whereIn);    }    public function getPersonNums($where, $whereIn, $groupBy)    {        return $this->jobfairPersonSignedRepository->getStatisticsPersonList($where, $whereIn, $groupBy);    }    public function getSignPersonEducations($type, $where, $whereIn, $groupBy, $fields)    {        return $this->jobfairPersonSignedRepository->getStatisticsPersonEducations($type, $where, $whereIn, $groupBy, $fields);    }}
 |