| 123456789101112131415161718192021222324252627282930313233 | 
							- <?php
 
- namespace App\Services\Recruit;
 
- use App\Repositories\Recruit\RecruitRepository;
 
- class RecruitService
 
- {
 
-     protected $recruitRepository;
 
-     public function __construct(RecruitRepository $recruitRepository)
 
-     {
 
-         $this->recruitRepository = $recruitRepository;
 
-     }
 
-     public function getRecruit($key = '', $page = '')
 
-     {
 
-         //搜索条件
 
-         $where   = [];
 
-         $where[] = ['status', '=', '1'];
 
-         if ($key) {
 
-             $where[] = ['name', 'like', '%' . $key . '%'];
 
-         }
 
-         //获取列表
 
-         $list = $this->recruitRepository->getRecuit($where, $page);
 
-         return $list;
 
-     }
 
- }
 
 
  |