|
@@ -7,16 +7,26 @@ use App\Model\Category;
|
|
|
use App\Model\WebsiteCategory;
|
|
|
use App\Model\ArticleSurvey;
|
|
|
use App\Model\jobHunting;
|
|
|
-use App\Model\JobEnum;
|
|
|
+use App\Model\District;
|
|
|
+use App\Model\Good;
|
|
|
+use App\Model\JobCompany;
|
|
|
+use App\Model\Website;
|
|
|
+use App\Model\JobRecruiting;
|
|
|
use App\Model\JobIndustry;
|
|
|
use App\Model\JobPosition;
|
|
|
-use App\Model\JobRecruiting;
|
|
|
-use App\Model\Good;
|
|
|
use App\Model\JobNature;
|
|
|
-use App\Model\Website;
|
|
|
+use App\Model\JobEnum;
|
|
|
+use App\Model\User;
|
|
|
+use App\Model\UserRole;
|
|
|
+use App\Model\News;
|
|
|
+use App\Model\UserInfo;
|
|
|
+use App\Model\WebsiteGroup;
|
|
|
+
|
|
|
+;
|
|
|
use Hyperf\DbConnection\Db;
|
|
|
use Hyperf\RpcServer\Annotation\RpcService;
|
|
|
use App\Tools\Result;
|
|
|
+use Directory;
|
|
|
use Ramsey\Uuid\Uuid;
|
|
|
use Hyperf\Utils\Random;
|
|
|
use Fukuball\Jieba\Jieba;
|
|
@@ -24,6 +34,8 @@ use Fukuball\Jieba\Finalseg;
|
|
|
use App\Model\ChatRecords;
|
|
|
use Hyperf\Utils\Collection;
|
|
|
|
|
|
+use function Hyperf\Support\retry;
|
|
|
+
|
|
|
#[RpcService(name: "NewsService", protocol: "jsonrpc-http", server: "jsonrpc-http")]
|
|
|
class NewsService implements NewsServiceInterface
|
|
|
{
|
|
@@ -2040,4 +2052,525 @@ class NewsService implements NewsServiceInterface
|
|
|
|
|
|
//20250324 通知,公告,消息
|
|
|
|
|
|
+
|
|
|
+ // 20250306 -------招聘--------fr
|
|
|
+ /*
|
|
|
+ * 招聘列表
|
|
|
+ * */
|
|
|
+ public function getJobRecruitingList(array $data): array
|
|
|
+ {
|
|
|
+ $where = [];
|
|
|
+ if(isset($data['keyword']) && !empty($data['keyword'])){
|
|
|
+ array_push($where, ['job_recruiting.title', 'like', '%'. $data['keyword']. '%']);
|
|
|
+ }
|
|
|
+ $user = User::where('id', $data['user_id'])->first();
|
|
|
+ if(empty($user)){
|
|
|
+ return Result::error("用户不存在", 0);
|
|
|
+ }
|
|
|
+ // 3:企业会员
|
|
|
+ if($user['type_id'] == 3){
|
|
|
+ array_push($where,['job_recruiting.user_id', $data['user_id']]);
|
|
|
+ array_push($where,['job_recruiting.website_id', $data['website_id']]);
|
|
|
+ }
|
|
|
+ // 如果 $where 为空,则不添加 where 条件
|
|
|
+ $result['rows'] = JobRecruiting::when(!empty($where), function ($query) use ($where) {
|
|
|
+ return $query->where($where);
|
|
|
+ })
|
|
|
+ ->leftJoin('website', 'job_recruiting.website_id', '=', 'website.id')
|
|
|
+ ->leftJoin('user', 'job_recruiting.user_id', '=', 'user.id')
|
|
|
+ ->select('job_recruiting.*', 'website.website_name as website_name', 'user.user_name as user_name')
|
|
|
+ ->orderBy("updated_at", "desc")
|
|
|
+ ->offset(($data['page'] - 1) * $data['page_size'])
|
|
|
+ ->limit($data['page_size'])
|
|
|
+ ->get()
|
|
|
+ ->all();
|
|
|
+ $result['count'] = JobRecruiting::when(!empty($where), function ($query) use ($where) {
|
|
|
+ return $query->where($where);
|
|
|
+ })
|
|
|
+ ->count();
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("暂无招聘信息", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /*
|
|
|
+ * 招聘信息添加
|
|
|
+ * */
|
|
|
+ public function addJobRecruiting(array $data): array
|
|
|
+ {
|
|
|
+ // return Result::success($data);
|
|
|
+ $user = User::where('user.id', $data['user_id'])
|
|
|
+ ->where('user.status',1)
|
|
|
+ ->leftJoin('user_info', 'user_info.user_id', 'user.id')
|
|
|
+ ->select(
|
|
|
+ 'user.type_id', 'user.mobile','user.email',
|
|
|
+ 'user_info.business_name',
|
|
|
+ 'user_info.hy_id',
|
|
|
+ 'user_info.company_nature',
|
|
|
+ 'user_info.company_size',
|
|
|
+ 'user_info.introduction',
|
|
|
+ 'user_info.real_name',
|
|
|
+ 'user_info.company_url',
|
|
|
+ 'user_info.address_arr_id',
|
|
|
+ 'user_info.address'
|
|
|
+ )
|
|
|
+ ->first();
|
|
|
+ if(empty($user) || $user['type_id'] != $data['user_type']){
|
|
|
+ return Result::error("用户不存在", 0);
|
|
|
+ }
|
|
|
+ $web = Website::where('id', $data['website_id'])->first();
|
|
|
+ if(empty($web)){
|
|
|
+ return Result::error("网站不存在", 0);
|
|
|
+ }
|
|
|
+ // return Result::success($user);
|
|
|
+ $data['action_id'] = $data['user_id'];
|
|
|
+ $data['user_type'] = $user['type_id'];
|
|
|
+ $data['cat_arr_id'] = array_values(array_unique($data['cat_arr_id']));
|
|
|
+ $data['city_arr_id'] = array_values(array_unique($data['city_arr_id']));
|
|
|
+ $data['cat_arr_id'] = isset($data['cat_arr_id'])? json_encode(array_map('intval', $data['cat_arr_id'])) : '';
|
|
|
+ $data['city_arr_id'] = isset($data['city_arr_id'])? json_encode(array_map('intval', $data['city_arr_id'])) : '';
|
|
|
+ // 公司地址 管理员必填
|
|
|
+ $data['address_arr_id'] = array_values(array_unique($data['address_arr_id']));
|
|
|
+ $data['address_arr_id'] = isset($data['address_arr_id'])? json_encode(array_map('intval', $data['address_arr_id'])) : '';
|
|
|
+ // 管理员-企业相关信息
|
|
|
+ $company = [
|
|
|
+ // 'user_id' => $data['user_id']?? null,
|
|
|
+ 'business_name' => $data['business_name']?? null,
|
|
|
+ 'company_hy_id' => $data['company_hy_id']?? null,
|
|
|
+ 'company_size' => $data['company_size']?? null,
|
|
|
+ 'company_nature' => $data['company_nature']?? null,
|
|
|
+ 'introduction' => $data['introduction']?? null,
|
|
|
+ 'real_name' => $data['real_name']?? null,
|
|
|
+ 'mobile' => $data['mobile']?? null,
|
|
|
+ 'company_url' => $data['company_url']?? null,
|
|
|
+ 'address_arr_id' => $data['address_arr_id']?? null,
|
|
|
+ 'address' => $data['address']?? null,
|
|
|
+ 'email' => $data['email']?? null,
|
|
|
+ ];
|
|
|
+ //去掉相关企业信息
|
|
|
+ $job = array_diff_key($data, array_flip(array_keys($company)));
|
|
|
+ Db::beginTransaction();
|
|
|
+ try {
|
|
|
+ // 先添加职位相关信息
|
|
|
+ $jobId = JobRecruiting::insertGetId($job);
|
|
|
+ if (empty($jobId)) {
|
|
|
+ Db::rollBack();
|
|
|
+ return Result::error("添加失败");
|
|
|
+ }
|
|
|
+ // 添加公司信息
|
|
|
+ $company['user_id'] = $data['user_id']?? null;
|
|
|
+ $company['job_id'] = $jobId;
|
|
|
+ $company['user_type'] = $user['type_id']?? null;
|
|
|
+ $company['website_id'] = $data['website_id']?? null;
|
|
|
+ if($user['type_id'] == 10000){
|
|
|
+ // 管理员添加企业信息
|
|
|
+ // return Result::success($company);
|
|
|
+ $companyId = JobCompany::insertGetId($company);
|
|
|
+ if (empty($companyId)) {
|
|
|
+ Db::rollBack();
|
|
|
+ return Result::error("添加失败");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ // 企业会员添加企业信息
|
|
|
+ $company = [
|
|
|
+ 'user_id' => $data['user_id']?? null,
|
|
|
+ 'business_name' => $user['business_name']?? null,
|
|
|
+ 'company_hy_id' => $user['hy_id']?? null,
|
|
|
+ 'company_size' => $user['company_size']?? null,
|
|
|
+ 'company_nature' => $user['company_nature']?? null,
|
|
|
+ 'introduction' => $user['introduction']?? null,
|
|
|
+ 'real_name' => $user['real_name']?? null,
|
|
|
+ 'mobile' => $user['mobile']?? null,
|
|
|
+ 'company_url' => $user['company_url']?? null,
|
|
|
+ 'address_arr_id' => $user['address_arr_id']?? null,
|
|
|
+ 'address' => $user['address']?? null,
|
|
|
+ 'email' => $user['email']?? null,
|
|
|
+ 'website_id' => $data['website_id']?? null,
|
|
|
+ 'user_type' => $user['type_id']?? null,
|
|
|
+ 'job_id' => $jobId,
|
|
|
+ ];
|
|
|
+ $companyId = JobCompany::insertGetId($company);
|
|
|
+ if (empty($companyId)) {
|
|
|
+ Db::rollBack();
|
|
|
+ return Result::error("添加失败");
|
|
|
+ }
|
|
|
+ // return Result::success($company);
|
|
|
+ }
|
|
|
+ Db::commit();
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ Db::rollBack();
|
|
|
+ return Result::error($e->getMessage(), 0);
|
|
|
+ }
|
|
|
+ $result = [
|
|
|
+ 'job_id' => $jobId,
|
|
|
+ 'company_id' => $companyId,
|
|
|
+ ];
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("添加失败", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ * 获取招聘信息详情
|
|
|
+ * */
|
|
|
+ public function getJobRecruitingInfo(array $data): array
|
|
|
+ {
|
|
|
+ $result = JobRecruiting::where('job_recruiting.id', $data['id'])
|
|
|
+ ->leftJoin('website', 'job_recruiting.website_id', '=', 'website.id')
|
|
|
+ ->leftJoin('job_company', 'job_recruiting.id', '=', 'job_company.job_id')
|
|
|
+ ->select('job_recruiting.*', 'website.website_name as website_name',
|
|
|
+ 'job_company.business_name',
|
|
|
+ 'job_company.company_hy_id',
|
|
|
+ 'job_company.company_size',
|
|
|
+ 'job_company.company_nature',
|
|
|
+ 'job_company.introduction',
|
|
|
+ 'job_company.real_name',
|
|
|
+ 'job_company.mobile',
|
|
|
+ 'job_company.company_url',
|
|
|
+ 'job_company.address_arr_id',
|
|
|
+ 'job_company.address',
|
|
|
+ 'job_company.email'
|
|
|
+ )
|
|
|
+ ->first();
|
|
|
+ if(empty($result)){
|
|
|
+ return Result::error("招聘信息不存在", 0);
|
|
|
+ }
|
|
|
+ // return Result::success($job);
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ * 修改招聘信息
|
|
|
+ * */
|
|
|
+ public function upJobRecruiting(array $data): array
|
|
|
+ {
|
|
|
+ $job = JobRecruiting::where('job_recruiting.id', $data['id'])->first();
|
|
|
+ // return Result::success($job);
|
|
|
+ if(empty($job)){
|
|
|
+ return Result::error("招聘信息不存在", 0);
|
|
|
+ }
|
|
|
+ $user = User::where('id', $data['user_id'])->first();
|
|
|
+ // return Result::success($user);
|
|
|
+ if(empty($user) || $user['type_id']!= $data['user_type']){
|
|
|
+ return Result::error("用户不存在", 0);
|
|
|
+ }
|
|
|
+ if($user['type_id']==3 && $job['user_id']!= $user['id']){
|
|
|
+ return Result::error("用户暂无权限修改此招聘信息!", 0);
|
|
|
+ }
|
|
|
+ $data['cat_arr_id'] = array_values(array_unique($data['cat_arr_id']));
|
|
|
+ $data['city_arr_id'] = array_values(array_unique($data['city_arr_id']));
|
|
|
+ $data['cat_arr_id'] = isset($data['cat_arr_id'])? json_encode(array_map('intval', $data['cat_arr_id'])) : '';
|
|
|
+ $data['city_arr_id'] = isset($data['city_arr_id'])? json_encode(array_map('intval', $data['city_arr_id'])) : '';
|
|
|
+
|
|
|
+ // 公司地址 管理员必填
|
|
|
+ $data['address_arr_id'] = array_values(array_unique($data['address_arr_id']));
|
|
|
+ $data['address_arr_id'] = isset($data['address_arr_id'])? json_encode(array_map('intval', $data['address_arr_id'])) : '';
|
|
|
+ // 管理员-企业相关信息
|
|
|
+ $company = [
|
|
|
+ 'business_name' => $data['business_name']?? null,
|
|
|
+ 'company_hy_id' => $data['hy_id']?? null,
|
|
|
+ 'company_size' => $data['company_size']?? null,
|
|
|
+ 'company_nature' => $data['company_nature']?? null,
|
|
|
+ 'introduction' => $data['introduction']?? null,
|
|
|
+ 'real_name' => $data['real_name']?? null,
|
|
|
+ 'mobile' => $data['mobile']?? null,
|
|
|
+ 'company_url' => $data['company_url']?? null,
|
|
|
+ 'address_arr_id' => $data['address_arr_id']?? null,
|
|
|
+ 'address' => $data['address']?? null,
|
|
|
+ 'email' => $data['email']?? null,
|
|
|
+ ];
|
|
|
+ //去掉相关企业信息
|
|
|
+ $data = array_diff_key($data, array_flip(array_keys($company)));
|
|
|
+ $jobId = $data['id'];
|
|
|
+ $web = $data['website_id'];
|
|
|
+ $data['action_id'] = $data['user_id'];
|
|
|
+ unset($data['user_id']);
|
|
|
+ unset($data['user_type']);
|
|
|
+ unset($data['id']);
|
|
|
+ unset($data['website_id']);
|
|
|
+ // return Result::success($data);
|
|
|
+ Db::beginTransaction();
|
|
|
+ try {
|
|
|
+ // 管理员修改招聘信息
|
|
|
+ if($user['type_id'] == 10000){
|
|
|
+ $data['website_id'] = $web;
|
|
|
+ $company['website_id'] = $data['website_id'];
|
|
|
+ }
|
|
|
+ // Db::rollBack();
|
|
|
+ // return Result::success($company);
|
|
|
+ $result['job'] = JobRecruiting::where('id', $jobId)->update($data);
|
|
|
+ if (empty($result['job'])) {
|
|
|
+ Db::rollBack();
|
|
|
+ return Result::error("修改招聘信息失败");
|
|
|
+ }
|
|
|
+ // 管理员修改企业相关信息
|
|
|
+ $result['company'] = JobCompany::where('job_id', $jobId)->update($company);
|
|
|
+ if (empty($result['company'])) {
|
|
|
+ Db::rollBack();
|
|
|
+ return Result::error("修改企业相关信息失败");
|
|
|
+ }
|
|
|
+ Db::commit();
|
|
|
+ // return Result::success($result);
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ Db::rollBack();
|
|
|
+ return Result::error($e->getMessage(), 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ * 招聘信息删除
|
|
|
+ * */
|
|
|
+ public function delJobRecruiting(array $data): array
|
|
|
+ {
|
|
|
+ $user = User::where('id', $data['user_id'])->first();
|
|
|
+ if(empty($user)){
|
|
|
+ return Result::error("用户不存在", 0);
|
|
|
+ }
|
|
|
+ $job = JobRecruiting::where('id', $data['id'])->first();
|
|
|
+ if(empty($job)){
|
|
|
+ return Result::error("招聘信息不存在", 0);
|
|
|
+ }
|
|
|
+ if($user['type_id']==3 && $job['user_id']!= $user['id']){
|
|
|
+ return Result::error("用户暂无权限修改此招聘信息!", 0);
|
|
|
+ }
|
|
|
+ Db::beginTransaction();
|
|
|
+ try {
|
|
|
+ $result['job'] = JobRecruiting::where('id', $data['id'])->delete();
|
|
|
+ if (empty($result['job'])) {
|
|
|
+ Db::rollBack();
|
|
|
+ return Result::error("删除招聘信息失败");
|
|
|
+ }
|
|
|
+ $result['company'] = JobCompany::where('job_id', $data['id'])->delete();
|
|
|
+ if (empty($result['company'])) {
|
|
|
+ Db::rollBack();
|
|
|
+ return Result::error("删除企业相关信息失败");
|
|
|
+ }
|
|
|
+ Db::commit();
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ Db::rollBack();
|
|
|
+ return Result::error($e->getMessage(), 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ * 获取公司信息
|
|
|
+ * */
|
|
|
+ public function getJobCompany(array $data): array
|
|
|
+ {
|
|
|
+ $user = User::where('user.id', $data['user_id'])
|
|
|
+ ->leftJoin('user_info', 'user_info.user_id', 'user.id')
|
|
|
+ ->select('user.user_name','user.mobile','user.email','user.type_id', 'user_info.*')
|
|
|
+ ->first();
|
|
|
+ // return Result::success($user);
|
|
|
+ if(empty($user)){
|
|
|
+ return Result::error("用户不存在", 0);
|
|
|
+ }
|
|
|
+ if($user['type_id'] == 3){
|
|
|
+ $result = [
|
|
|
+ // 'id' => 0,
|
|
|
+ 'user_id' => $data['user_id'],
|
|
|
+ 'website_id' => $data['website_id'],
|
|
|
+ 'business_name' => $user['business_name'], // 企业名称
|
|
|
+ 'company_hy_id' => $user['company_hy_id'], // 企业所属行业
|
|
|
+ 'company_nature' => $user['company_nature'], // 公司性质
|
|
|
+ 'company_size' => $user['company_size'], // 公司规模
|
|
|
+ 'introduction' => $user['introduction'], // 公司简介
|
|
|
+ 'real_name' => $user['real_name'], // 企业联系人
|
|
|
+ 'mobile' => $user['mobile'], // 企业联系电话
|
|
|
+ 'company_url' => $user['company_url'], // 企业网址
|
|
|
+ 'address_arr_id' => $user['address_arr_id'], // 企业网址
|
|
|
+ 'address' => $user['address'], // 企业地址
|
|
|
+ 'email' => $user['email'], // 企业邮箱
|
|
|
+ ];
|
|
|
+ }else{
|
|
|
+ return Result::error("用户类型错误", 0);
|
|
|
+ }
|
|
|
+ if(empty($result)){
|
|
|
+ return Result::error("公司信息不存在", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ * 修改公司信息
|
|
|
+ * */
|
|
|
+ public function upJobCompany(array $data): array
|
|
|
+ {
|
|
|
+ // return Result::success($data);
|
|
|
+ $user = User::where('user.id', $data['user_id'])
|
|
|
+ ->where('user.status',1)
|
|
|
+ ->leftJoin('user_info', 'user_info.user_id', 'user.id')
|
|
|
+ ->select('user.user_name','user.type_id', 'user_info.*')
|
|
|
+ ->first();
|
|
|
+ if(empty($user)){
|
|
|
+ return Result::error("用户不存在", 0);
|
|
|
+ }
|
|
|
+ $data['address_arr_id'] = isset($data['address_arr_id'])? json_encode(array_map('intval', $data['address_arr_id'])) : '';
|
|
|
+ $company = [
|
|
|
+ 'business_name' => $data['business_name'], // 企业名称
|
|
|
+ 'company_hy_id' => $data['company_hy_id'], // 企业所属行业
|
|
|
+ 'company_nature' => $data['company_nature'], // 公司性质
|
|
|
+ 'company_size' => $data['company_size'], // 公司规模
|
|
|
+ 'introduction' => $data['introduction'], // 公司简介
|
|
|
+ 'real_name' => $data['real_name'], // 企业联系人
|
|
|
+ 'company_url' => $data['company_url'], // 企业网址
|
|
|
+ 'address_arr_id' => $data['address_arr_id'], // 企业地址
|
|
|
+ 'address' => $data['address'], // 企业详细地址
|
|
|
+ ];
|
|
|
+ if($user['type_id'] == 3){
|
|
|
+ $result['user'] = User::where('user.id', $data['user_id'])->update([
|
|
|
+ 'mobile' => $data['mobile'], // 企业联系电话
|
|
|
+ 'email' => $data['email'], // 企业邮箱
|
|
|
+ ]);
|
|
|
+ $result['userinfo'] = UserInfo::where('user_id', $data['user_id'])->update([
|
|
|
+ 'business_name' => $data['business_name'], // 企业名称
|
|
|
+ 'company_hy_id' => $data['company_hy_id'], // 企业所属行业
|
|
|
+ 'company_nature' => $data['company_nature'], // 公司性质
|
|
|
+ 'company_size' => $data['company_size'], // 公司规模
|
|
|
+ 'introduction' => $data['introduction'], // 公司简介
|
|
|
+ 'real_name' => $data['real_name'], // 企业联系人
|
|
|
+ 'company_url' => $data['company_url'], // 企业网址
|
|
|
+ 'address_arr_id' => $data['address_arr_id'], // 企业地址
|
|
|
+ 'address' => $data['address'], // 企业详细地址
|
|
|
+ ]);
|
|
|
+ $result = JobCompany::where('user_id', $data['user_id'])->update($company);
|
|
|
+ }else{
|
|
|
+ return Result::error("用户类型错误", 0);
|
|
|
+ }
|
|
|
+ if(empty($result)){
|
|
|
+ return Result::error("修改失败", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ * 获取省-市
|
|
|
+ * */
|
|
|
+ public function getJobRecruitingArea(array $data): array
|
|
|
+ {
|
|
|
+ if(isset($data['province_id']) && $data['province_id']!=null){
|
|
|
+ $result = District::where('pid',$data['pid'])->get()->all();
|
|
|
+ }else{
|
|
|
+ $result = District::where('level',1)->get()->all();
|
|
|
+ }
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("暂无此省市", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ * 获取行业分类
|
|
|
+ * */
|
|
|
+ public function getIndustry(array $data): array
|
|
|
+ {
|
|
|
+ $result = JobIndustry::get()->all();
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("暂无行业分类", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ * 获取职位
|
|
|
+ * */
|
|
|
+ public function getPositionList(array $data): array
|
|
|
+ {
|
|
|
+ if(isset($data['zwpid']) && $data['zwpid']!=null){
|
|
|
+ $result = JobPosition::where('zwpid',$data['zwpid'])->get()->all();
|
|
|
+ }else{
|
|
|
+ $result = JobPosition::where('zwpid',0)->get()->all();
|
|
|
+ }
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("暂无此职位", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ * 获取工作性质-菜单
|
|
|
+ * */
|
|
|
+ public function getJobNature(array $data): array
|
|
|
+ {
|
|
|
+ $result = JobEnum::where('egroup','nature')->get()->all();
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("暂无工作性质", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ * 获取工作经验-菜单
|
|
|
+ * */
|
|
|
+ public function getExperience(array $data): array
|
|
|
+ {
|
|
|
+ $result = JobEnum::where('egroup','years')->get()->all();
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("暂无工作经验", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ * 获取学历-菜单
|
|
|
+ * */
|
|
|
+ public function getEducation(array $data): array
|
|
|
+ {
|
|
|
+ $result = JobEnum::where('egroup','education')->get()->all();
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("暂无学历", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ * 获取薪资-菜单
|
|
|
+ * */
|
|
|
+ public function getSalary(array $data): array
|
|
|
+ {
|
|
|
+ $result = JobEnum::where('egroup','income')->get()->all();
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("暂无薪资", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ * 获取语言-菜单
|
|
|
+ * */
|
|
|
+ public function getLanguage(array $data): array
|
|
|
+ {
|
|
|
+ $result = JobEnum::where('egroup','language')->get()->all();
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("暂无语言", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ * 获取掌握程度-菜单
|
|
|
+ * */
|
|
|
+ public function getLevel(array $data): array
|
|
|
+ {
|
|
|
+ $result = JobEnum::where('egroup','languagetype')->get()->all();
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("暂无工作性质", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ // 公司信息
|
|
|
+ /*
|
|
|
+ * 获取公司性质-菜单
|
|
|
+ * */
|
|
|
+ public function getCompanyNature(array $data): array
|
|
|
+ {
|
|
|
+ $result = JobNature::get()->all();
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("暂无公司性质", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ /*
|
|
|
+ * 获取公司规模-菜单
|
|
|
+ * */
|
|
|
+ public function getCompanySize(array $data): array
|
|
|
+ {
|
|
|
+ $result = JobEnum::where('egroup','cosize')->get()->all();
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("暂无公司规模", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ // 20250306 招聘
|
|
|
}
|