LiuJ 2 päivää sitten
vanhempi
sitoutus
36146aaf25
1 muutettua tiedostoa jossa 109 lisäystä ja 109 poistoa
  1. 109 109
      app/JsonRpc/NewsService.php

+ 109 - 109
app/JsonRpc/NewsService.php

@@ -3872,12 +3872,12 @@ class NewsService implements NewsServiceInterface
       // 如果 city_arr_id 不是字符串,直接取最后一个数据
       $data['city_id'] = end($data['city_arr_id']);
     }
-    if((isset($data['status']) && $data['status']==1) || !isset($data['status'])){
+    if ((isset($data['status']) && $data['status'] == 1) || !isset($data['status'])) {
       $this->sendMessage([
-        'talk_type'=>600,
-        'title'=>$data['title'],
-        'content'=>'提交了审核',
-        'messageType'=>11,
+        'talk_type' => 600,
+        'title' => $data['title'],
+        'content' => '提交了审核',
+        'messageType' => 11,
       ]);
     }
     $result = JobHunting::create($data);
@@ -3915,12 +3915,12 @@ class NewsService implements NewsServiceInterface
       // 如果 city_arr_id 不是字符串,直接取最后一个数据
       $data['city_id'] = end($data['city_arr_id']);
     }
-    if((isset($data['status']) && $data['status']==1) || !isset($data['status'])){
+    if ((isset($data['status']) && $data['status'] == 1) || !isset($data['status'])) {
       $this->sendMessage([
-        'talk_type'=>600,
-        'title'=>$data['title'],
-        'content'=>'提交了审核',
-        'messageType'=>11,
+        'talk_type' => 600,
+        'title' => $data['title'],
+        'content' => '提交了审核',
+        'messageType' => 11,
       ]);
     }
     $result = JobHunting::where('id', $data['id'])->update($data);
@@ -4410,22 +4410,22 @@ class NewsService implements NewsServiceInterface
     unset($data['user_id']);
     unset($data['type_id']);
     $jogHuntingInfo = JobHunting::where('id', $data['id'])->first();
-    if($data['status']==2){
+    if ($data['status'] == 2) {
       $this->sendMessage([
-        'talk_type'=>600,
-        'title'=>$jogHuntingInfo['name'],
-        'content'=>'审核通过',
-        'messageType'=>11,
-        'user_id'=>$jogHuntingInfo['user_id'],
+        'talk_type' => 600,
+        'title' => $jogHuntingInfo['name'],
+        'content' => '审核通过',
+        'messageType' => 11,
+        'user_id' => $jogHuntingInfo['user_id'],
       ]);
     }
-    if($data['status']==3){
+    if ($data['status'] == 3) {
       $this->sendMessage([
-        'talk_type'=>600,
-        'title'=>$jogHuntingInfo['name'],
-        'content'=>'审核拒绝',
-        'messageType'=>11,
-        'user_id'=>$jogHuntingInfo['user_id'],
+        'talk_type' => 600,
+        'title' => $jogHuntingInfo['name'],
+        'content' => '审核拒绝',
+        'messageType' => 11,
+        'user_id' => $jogHuntingInfo['user_id'],
       ]);
     }
     $result = JobHunting::where('id', $data['id'])->update($data);
@@ -4698,12 +4698,12 @@ class NewsService implements NewsServiceInterface
       } else {
         $job['experience'] = $data['experience'];
       }
-      if((isset($data['status']) && $data['status']==0) || !isset($data['status'])){
+      if ((isset($data['status']) && $data['status'] == 0) || !isset($data['status'])) {
         $this->sendMessage([
-          'talk_type'=>500,
-          'title'=>$data['title'],
-          'content'=>'提交了审核',
-          'messageType'=>10,
+          'talk_type' => 500,
+          'title' => $data['title'],
+          'content' => '提交了审核',
+          'messageType' => 10,
         ]);
       }
       $jobId = JobRecruiting::insertGetId($job);
@@ -4880,12 +4880,12 @@ class NewsService implements NewsServiceInterface
       }
       // Db::rollBack();
       // return Result::success($company);
-      if((isset($data['status']) && $data['status']==0) || !isset($data['status'])){
+      if ((isset($data['status']) && $data['status'] == 0) || !isset($data['status'])) {
         $this->sendMessage([
-          'talk_type'=>500,
-          'title'=>$data['title'],
-          'content'=>'提交了审核',
-          'messageType'=>10,
+          'talk_type' => 500,
+          'title' => $data['title'],
+          'content' => '提交了审核',
+          'messageType' => 10,
         ]);
       }
       $result['job'] = JobRecruiting::where('id', $jobId)->update($data);
@@ -5187,23 +5187,23 @@ class NewsService implements NewsServiceInterface
     }
     $data['action_id'] = $data['user_id'];
     unset($data['user_id']);
-	  
-    if($data['status']==1){
+
+    if ($data['status'] == 1) {
       $this->sendMessage([
-        'talk_type'=>500,
-        'title'=>$job['title'],
-        'content'=>'审核通过',
-        'messageType'=>10,
-        'user_id'=>$job['user_id'],
+        'talk_type' => 500,
+        'title' => $job['title'],
+        'content' => '审核通过',
+        'messageType' => 10,
+        'user_id' => $job['user_id'],
       ]);
     }
-    if($data['status']==2){
+    if ($data['status'] == 2) {
       $this->sendMessage([
-        'talk_type'=>500,
-        'title'=>$job['title'],
-        'content'=>'审核拒绝',
-        'messageType'=>10,
-        'user_id'=>$job['user_id'],
+        'talk_type' => 500,
+        'title' => $job['title'],
+        'content' => '审核拒绝',
+        'messageType' => 10,
+        'user_id' => $job['user_id'],
       ]);
     }
 
@@ -5458,12 +5458,12 @@ class NewsService implements NewsServiceInterface
       $data['description'] = mb_substr($cleaned, 0, 100, 'UTF-8');
     }
     var_dump($data, '--');
-    if($data['status']==1){
+    if ($data['status'] == 1) {
       $this->sendMessage([
-        'talk_type'=>400,
-        'title'=>$data['title'],
-        'content'=>'提交了审核',
-        'messageType'=>7,
+        'talk_type' => 400,
+        'title' => $data['title'],
+        'content' => '提交了审核',
+        'messageType' => 7,
       ]);
     }
     $result = Book::insertGetId($data);
@@ -5558,12 +5558,12 @@ class NewsService implements NewsServiceInterface
     }
     $data['city_arr_id'] = is_array($data['city_arr_id']) ? Json::encode($data['city_arr_id']) : '[]';
     $data['cat_arr_id'] = is_array($data['cat_arr_id']) ? Json::encode($data['cat_arr_id']) : '[]';
-    if($data['status']==1){
+    if ($data['status'] == 1) {
       $this->sendMessage([
-        'talk_type'=>400,
-        'title'=>$data['title'],
-        'content'=>'提交了审核',
-        'messageType'=>7,
+        'talk_type' => 400,
+        'title' => $data['title'],
+        'content' => '提交了审核',
+        'messageType' => 7,
       ]);
     }
     $result = Book::where("id", $data["id"])->update($data);
@@ -5585,22 +5585,22 @@ class NewsService implements NewsServiceInterface
     //审核
     unset($data['user_id']);
     $bookInfo = Book::where("id", $data["id"])->first();
-    if($bookInfo['status']==2){
+    if ($bookInfo['status'] == 2) {
       $this->sendMessage([
-        'talk_type'=>400,
-        'title'=>$bookInfo['title'],
-        'content'=>'审核通过',
-        'messageType'=>7,
-        'user_id'=>$bookInfo['user_id'],
+        'talk_type' => 400,
+        'title' => $bookInfo['title'],
+        'content' => '审核通过',
+        'messageType' => 7,
+        'user_id' => $bookInfo['user_id'],
       ]);
     }
-    if($bookInfo['status']==3){
+    if ($bookInfo['status'] == 3) {
       $this->sendMessage([
-        'talk_type'=>400,
-        'title'=>$bookInfo['title'],
-        'content'=>'审核拒绝',
-        'messageType'=>7,
-        'user_id'=>$bookInfo['user_id'],
+        'talk_type' => 400,
+        'title' => $bookInfo['title'],
+        'content' => '审核拒绝',
+        'messageType' => 7,
+        'user_id' => $bookInfo['user_id'],
       ]);
     }
     $result = Book::where("id", $data["id"])->update($data);
@@ -6125,12 +6125,12 @@ class NewsService implements NewsServiceInterface
     } else {
       $data['level'] = null;
     }
-    if((isset($data['status']) && $data['status']==0) || !isset($data['status'])){
+    if ((isset($data['status']) && $data['status'] == 0) || !isset($data['status'])) {
       $this->sendMessage([
-        'talk_type'=>900,
-        'title'=>$data['title'],
-        'content'=>'提交了审核',
-        'messageType'=>8,
+        'talk_type' => 900,
+        'title' => $data['title'],
+        'content' => '提交了审核',
+        'messageType' => 8,
       ]);
     }
     $result = Company::insertGetId($data);
@@ -6203,12 +6203,12 @@ class NewsService implements NewsServiceInterface
     } else {
       $data['status'] = 0;
     }
-    if((isset($data['status']) && $data['status']==0) || !isset($data['status'])){
+    if ((isset($data['status']) && $data['status'] == 0) || !isset($data['status'])) {
       $this->sendMessage([
-        'talk_type'=>900,
-        'title'=>$data['title'],
-        'content'=>'提交了审核',
-        'messageType'=>8,
+        'talk_type' => 900,
+        'title' => $data['title'],
+        'content' => '提交了审核',
+        'messageType' => 8,
       ]);
     }
     $result = Company::where('id', $data['id'])->update($data);
@@ -6250,22 +6250,22 @@ class NewsService implements NewsServiceInterface
     // 状态:0:未审核 1:已审核 2:已拒绝
     if ($data['status'] == 2 || $data['status'] == '2') {
       $this->sendMessage([
-        'talk_type'=>901,
-        'title'=>$company['title'],
-        'content'=>'审核拒绝',
-        'messageType'=>8,
-        'user_id'=>$company['user_id'],
+        'talk_type' => 901,
+        'title' => $company['title'],
+        'content' => '审核拒绝',
+        'messageType' => 8,
+        'user_id' => $company['user_id'],
       ]);
       $result = Company::where('id', $data['id'])->update(['status' => $data['status'], 'reject_reason' => $data['reason']]);
     } else {
       $this->sendMessage([
-        'talk_type'=>901,
-        'title'=>$company['title'],
-        'content'=>'审核通过',
-        'messageType'=>8,
-        'user_id'=>$company['user_id'],
+        'talk_type' => 901,
+        'title' => $company['title'],
+        'content' => '审核通过',
+        'messageType' => 8,
+        'user_id' => $company['user_id'],
       ]);
-     
+
       $result = Company::where('id', $data['id'])->update(['status' => $data['status']]);
     }
     if (empty($result)) {
@@ -6544,12 +6544,12 @@ class NewsService implements NewsServiceInterface
       $data['description'] = mb_substr($content, 0, 100);
       // 过滤 HTML 标签并去除空格,然后截取前 100 个字符
     }
-    if($data['status']==0){
+    if ($data['status'] == 0) {
       $this->sendMessage([
-        'talk_type'=>1000,
-        'title'=>$data['title'],
-        'content'=>'提交了审核',
-        'messageType'=>9,
+        'talk_type' => 1000,
+        'title' => $data['title'],
+        'content' => '提交了审核',
+        'messageType' => 9,
       ]);
     }
     $project = Project::insertGetId($data);
@@ -6610,12 +6610,12 @@ class NewsService implements NewsServiceInterface
       $data['description'] = mb_substr($content, 0, 100);
       // 过滤 HTML 标签并去除空格,然后截取前 100 个字符
     }
-    if($data['status']==0){
+    if ($data['status'] == 0) {
       $this->sendMessage([
-        'talk_type'=>1000,
-        'title'=>$data['title'],
-        'content'=>'提交了审核',
-        'messageType'=>9,
+        'talk_type' => 1000,
+        'title' => $data['title'],
+        'content' => '提交了审核',
+        'messageType' => 9,
       ]);
     }
     $result = Project::where('id', $id)->update($data);
@@ -6669,20 +6669,20 @@ class NewsService implements NewsServiceInterface
     }
     if ($data['status'] == 2) {
       $this->sendMessage([
-        'talk_type'=>1001,
-        'title'=>$project['title'],
-        'content'=>'审核拒绝',
-        'messageType'=>9,
-        'user_id'=>$project['user_id'],
+        'talk_type' => 1001,
+        'title' => $project['title'],
+        'content' => '审核拒绝',
+        'messageType' => 9,
+        'user_id' => $project['user_id'],
       ]);
       $result = Project::where('id', $data['id'])->update(['status' => $data['status'], 'refuse_reason' => $data['refuse_reason']]);
     } else {
       $this->sendMessage([
-        'talk_type'=>1001,
-        'title'=>$project['title'],
-        'content'=>'审核通过',
-        'messageType'=>9,
-        'user_id'=>$project['user_id'],
+        'talk_type' => 1001,
+        'title' => $project['title'],
+        'content' => '审核通过',
+        'messageType' => 9,
+        'user_id' => $project['user_id'],
       ]);
       $result = Project::where('id', $data['id'])->update(['status' => $data['status']]);
     }
@@ -7046,7 +7046,7 @@ class NewsService implements NewsServiceInterface
         // ->limit(5)
         ->get();
       //获取5条用户的求职 2
-      $job_recruiting = JobRecruiting::where('job_recruiting.status', 1)
+      $job_recruiting = JobRecruiting::where('job_recruiting.status', 0)
         ->leftJoin('user', 'job_recruiting.user_id', '=', 'user.id')
         ->leftJoin('website', 'job_recruiting.website_id', '=', 'website.id')
         ->select('job_recruiting.*', 'user.nickname as nickname', 'user.user_name as user_name', 'website.website_name as website_name')