AI 3 settimane fa
parent
commit
e6e1be5a68

+ 26 - 0
app/Controller/NewsController.php

@@ -738,4 +738,30 @@ class NewsController extends AbstractController
          return $result['code']==200 ? Result::success($result['data']) : Result::error($result['message']);
      }
     //20250306  求职
+    //20250324  通知,公告,消息
+     public function getMSG(){
+         $requireData = $this->request->all();
+         $validator = $this->validationFactory->make($requireData,
+             [
+                  
+             ],
+             [
+                
+             ]
+         ); if ($validator->fails()) {
+             $errorMessage = $validator->errors()->first();
+             return Result::error($errorMessage);
+         }
+         $user_id = Context::get("UserId");
+         $userInfo = $this->userServiceClient->getUserInfo((int)$user_id);
+         if($userInfo['code']!=200){
+             return Result::error($userInfo['message']);
+         }
+         $requireData['user_id'] = $user_id;
+         $requireData['type_id'] = $userInfo['data']['type_id'];
+         $result = $this->newsServiceClient->getMSG($requireData);
+         return $result['code']==200 ? Result::success($result['data']) : Result::error($result['message']);
+     }
+     
+    //20250324  通知,公告,消息
 }

+ 50 - 0
app/JsonRpc/NewsService.php

@@ -275,4 +275,54 @@ class NewsService extends AbstractServiceClient implements NewsServiceInterface
     {
         return $this->__request(__FUNCTION__, $data);
     }
+
+    //20250324  通知,公告,消息
+    public function getNoticeList(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+    public function getNoticeInfo(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+    public function addNotice(array $data): array
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+    public function updateNotice(array $data): array
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+    public function deleteNotice(array $data): array
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+    public function getMSG(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+
+    public function getComplaintList(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+
+    public function getComplaintInfo(array $data)
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+
+    public function addComplaint(array $data): array
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+    public function updateComplaint(array $data): array
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+    public function deleteComplaint(array $data): array
+    {
+        return $this->__request(__FUNCTION__, $data);
+    }
+    //20250324  通知,公告,消息
 }

+ 16 - 3
app/JsonRpc/NewsServiceInterface.php

@@ -112,7 +112,7 @@ interface NewsServiceInterface
      * @return mixed
      */
     public function getSurveyInfo(array $data);
-     /**
+    /**
      * @param array $data
      * @return mixed
      */
@@ -120,7 +120,7 @@ interface NewsServiceInterface
     /**
      * @param array $data
      * @return mixed
-    */
+     */
     public function getWebsiteCatidArticle(array $data);
 
     /**
@@ -143,6 +143,19 @@ interface NewsServiceInterface
     public function updateJobHunting(array $data);
     public function delJobHunting(array $data);
     public function getJobHuntingData(array $data);
-    //20250306  求职信息
+
+    //20250324  通知,公告,消息
+    public function getNoticeList(array $data);
+    public function getNoticeInfo(array $data);
+    public function addNotice(array $data);
+    public function updateNotice(array $data);
+    public function deleteNotice(array $data);
+    public function getMSG(array $data);
+    public function getComplaintList(array $data);
+    public function getComplaintInfo(array $data);
+    public function addComplaint(array $data);
+    public function updateComplaint(array $data);
+    public function deleteComplaint(array $data);
+    //20250324  通知,公告,消息
 
 }

+ 16 - 0
config/api/news.php

@@ -61,6 +61,22 @@ Router::addGroup(
         Router::post('/delJobHunting', [NewsController::class, 'delJobHunting']);
         Router::post('/getJobHuntingData', [NewsController::class, 'getJobHuntingData']);
         //20250306  求职信息
+        //20250324  通知,公告,消息
+        Router::post('/getNoticeList', [NewsController::class, 'getNoticeList']);
+        Router::post('/getNoticeInfo', [NewsController::class, 'getNoticeInfo']);
+        Router::post('/addNotice', [NewsController::class, 'addNotice']);
+        Router::post('/updateNotice', [NewsController::class, 'updateNotice']);
+        Router::post('/deleteNotice', [NewsController::class, 'deleteNotice']);
+
+        Router::post('/getMSG', [NewsController::class, 'getMSG']);
+        //投诉
+        Router::post('/getComplaintList', [NewsController::class, 'getComplaintList']);
+        Router::post('/getComplaintInfo', [NewsController::class, 'getComplaintInfo']);
+        Router::post('/addComplaint', [NewsController::class, 'addComplaint']);
+        Router::post('/updateComplaint', [NewsController::class, 'updateComplaint']);
+        Router::post('/deleteComplaint', [NewsController::class, 'deleteComplaint']);
+        //20250324  通知,公告,消息
+
     },
     ['middleware' => [FooMiddleware::class]]
 );