Browse Source

招工招聘-b端

15313670163 1 month ago
parent
commit
b771d757dd

+ 27 - 0
app/Controller/NewsController.php

@@ -1580,6 +1580,33 @@ class NewsController extends AbstractController
         $result = $this->newsServiceClient->checkJobRecruiting($requireData);
         return $result['code'] == 200 ? Result::success($result['data']) : Result::error($result['message']);
     }
+    /*
+    *后端-招聘 职位机会列表
+    * @return array
+    */
+    public function getRecruitingList(){
+        $requireData = $this->request->all();
+        $validator = $this->validationFactory->make(
+            $requireData,
+            [
+                'page'=>'required|integer',
+                'pageSize'=>'required|integer',
+            ],
+            [
+                'page.required' => '第几页不能为空',
+                'page.integer' =>'第几页必须是整数',
+                'pageSize.required' => '每页显示数量不能为空',
+                'pageSize.integer' =>'每页显示数量必须是整数'
+            ]
+        );
+        $requireData['user_id'] = Context::get("UserId");
+        if ($validator->fails()) {
+            $errorMessage = $validator->errors()->first();
+            return Result::error($errorMessage);
+        }
+        $result = $this->newsServiceClient->getRecruitingList($requireData);
+        return $result['code']==200? Result::success($result['data']) : Result::error($result['message']);
+    }    
     //202504084  审核状态
     public function updateGoodStatus()
     {

+ 16 - 0
app/JsonRpc/NewsService.php

@@ -560,6 +560,22 @@ class NewsService extends AbstractServiceClient implements NewsServiceInterface
     {
         return $this->__request(__FUNCTION__, $data);
     }
+    /**
+     * @param array $data
+     * @return mixed
+     */
+    public function getRecruitingList(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+    /**
+     * @param array $data
+     * @return mixed
+     */
+    public function getRecruitingInfo(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
     //20250422  书刊音像
     public function getBookList(array $data)
     {

+ 10 - 0
app/JsonRpc/NewsServiceInterface.php

@@ -299,4 +299,14 @@ interface NewsServiceInterface
   public function updateBook(array $data);
   public function updateBookStatus(array $data);
   //20250422  书刊音像
+    /**
+     * @param array $data
+     * @return mixed
+     */
+    public function getRecruitingList(array $data);
+    /**
+     * @param array $data
+     * @return mixed
+     */
+    public function getRecruitingInfo(array $data);
 }

+ 5 - 0
config/api/news.php

@@ -120,6 +120,11 @@ Router::addGroup(
         Router::get('/getLevel', [NewsController::class, 'getLevel']);
         Router::get('/getCompanySize', [NewsController::class, 'getCompanySize']);
         Router::get('/getCompanyNature', [NewsController::class, 'getCompanyNature']);
+        // b端
+        Router::get('/getRecruitingList', [NewsController::class, 'getRecruitingList']);
+        Router::get('/getRecruitingInfo', [NewsController::class, 'getRecruitingInfo']);
+
+
 
         // 20250306 招聘
     },