Преглед изворни кода

修改职场机会(个人会员收到企业推送岗位)

15313670163 пре 4 дана
родитељ
комит
f941724dac
2 измењених фајлова са 31 додато и 3 уклоњено
  1. 4 3
      app/JsonRpc/NewsService.php
  2. 27 0
      app/Model/JobResume.php

+ 4 - 3
app/JsonRpc/NewsService.php

@@ -30,7 +30,7 @@ use Ramsey\Uuid\Uuid;
 use Hyperf\Utils\Random;
 
 use function Hyperf\Support\retry;
-use App\Model\JobApply;
+use App\Model\JobResume;
 #[RpcService(name: "NewsService", protocol: "jsonrpc-http", server: "jsonrpc-http")]
 class NewsService implements NewsServiceInterface
 {
@@ -1641,7 +1641,7 @@ class NewsService implements NewsServiceInterface
         return Result::success($result);
     }
     /*
-    * 获取招聘信息列表
+    * 获取招聘信息列表-职场机会(个人会员收到企业推送岗位)
     * */
     public function getRecruitingList(array $data): array
     {
@@ -1649,10 +1649,11 @@ class NewsService implements NewsServiceInterface
         if(empty($user) || ($user['type_id']!= 10000 && $user['type_id']!= 1)){
             return Result::error("用户不存在", 0);
         }
+        // 1:个人会员    职场机会
         if($user['type_id'] == 1){
             $where['user_id'] = $user['id'];
         }
-        $recruitingId = JobApply::when($user['type_id'] == 1, function ($query) use ($user) {
+        $recruitingId = JobResume::when($user['type_id'] == 1, function ($query) use ($user) {
             $query->where('recruit_id', $user['id']);
         })
         ->pluck('recruit_id');

+ 27 - 0
app/Model/JobResume.php

@@ -0,0 +1,27 @@
+<?php
+
+declare(strict_types=1);
+
+namespace App\Model;
+
+use Hyperf\DbConnection\Model\Model;
+
+/**
+ */
+class JobResume extends Model
+{
+    /**
+     * The table associated with the model.
+     */
+    protected ?string $table = 'job_resume';
+
+    /**
+     * The attributes that are mass assignable.
+     */
+    protected array $fillable = [];
+
+    /**
+     * The attributes that should be cast to native types.
+     */
+    protected array $casts = [];
+}