|
@@ -6,6 +6,7 @@ use App\Http\Controllers\Mobile\MobileBaseController;
|
|
|
use App\Models\Article;
|
|
|
use App\Models\Jobs;
|
|
|
use App\Services\Company\JobsService;
|
|
|
+use Illuminate\Support\Facades\DB;
|
|
|
|
|
|
class IndexController extends MobileBaseController
|
|
|
{
|
|
@@ -32,16 +33,7 @@ class IndexController extends MobileBaseController
|
|
|
|
|
|
//招聘列表
|
|
|
$size = 10;
|
|
|
- $list = Jobs::whereIn('id', function ($query) {
|
|
|
- $query->select('id')
|
|
|
- ->from('jobs')
|
|
|
- ->where([
|
|
|
- ['is_ic', '=', 1],
|
|
|
- ['valid', '=', 1],
|
|
|
- ['audit', '=', 1],
|
|
|
- ['display', '=', 1],
|
|
|
- ])->orderBy('updated_at', 'desc');
|
|
|
- })->groupBy('company_id')->limit(5)->get();
|
|
|
+ $list = Jobs::whereIn('id', DB::raw("select id from jobs where is_ic = 1 and valid = 1 and audit = 1 and display = 1 ORDER BY updated_at desc"))->groupBy('company_id')->limit(5)->get();
|
|
|
if ($list->isEmpty()) {
|
|
|
$recruit_list = [];
|
|
|
} else {
|