|
@@ -2664,6 +2664,30 @@ class NewsService implements NewsServiceInterface
|
|
|
return $article;
|
|
|
});
|
|
|
}
|
|
|
+ /**
|
|
|
+ * c端-获取招工招聘下拉选框
|
|
|
+ * @param array $data
|
|
|
+ * @return array
|
|
|
+ * */
|
|
|
+ public function getWebsiteJobSelect(array $data): array
|
|
|
+ {
|
|
|
+ $web = Website::where('id', $data['website_id'])->first();
|
|
|
+ if(empty($web)){
|
|
|
+ return Result::error("该网站不存在", 0);
|
|
|
+ }
|
|
|
+ $hy = JobIndustry::get()->all();
|
|
|
+ $zw = JobPosition::where('zwpid',0)->get()->all();
|
|
|
+ $jtzw = JobPosition::where('zwpid','!=',0)->get()->all();
|
|
|
+ $result = [
|
|
|
+ 'hy' => $hy,
|
|
|
+ 'zw' => $zw,
|
|
|
+ 'jtzw' => $jtzw,
|
|
|
+ ];
|
|
|
+ if(empty($result)){
|
|
|
+ return Result::error("查询失败", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
/**
|
|
|
* c端-获取招工招聘
|
|
|
* @param array $data
|
|
@@ -2733,15 +2757,10 @@ class NewsService implements NewsServiceInterface
|
|
|
} else {
|
|
|
$job_recruitings = $this->processJob($job_recruiting, $web);
|
|
|
}
|
|
|
- $hy = JobIndustry::get()->all();
|
|
|
- $zw = JobPosition::where('zwpid', 0)->get()->all();
|
|
|
- $jtzw = JobPosition::where('zwpid', '!=', 0)->get()->all();
|
|
|
+
|
|
|
$result = [
|
|
|
'job_hunting' => $job_huntings,
|
|
|
'job_recuiting' => $job_recruitings,
|
|
|
- 'hy' => $hy,
|
|
|
- 'zw' => $zw,
|
|
|
- 'jtzw' => $jtzw,
|
|
|
];
|
|
|
return Result::success($result);
|
|
|
}
|