Ver Fonte

修改c端:获取商品列表的接口;初步定义c端企业的接口

15313670163 há 1 semana atrás
pai
commit
c6341f3e51

+ 50 - 0
app/JsonRpc/NewsService.php

@@ -2782,4 +2782,54 @@ private function fetchArticles($catId, $website, $limit, $isImageArticle = false
        }
         return Result::success($result);
     }
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function getWebsiteCompany(array $data): array
+    {
+        $job = JobRecruiting::where('job_recruiting.website_id', $data['website_id'])
+            ->where('job_recruiting.status', 1)
+            ->where('job_recruiting.id', $data['id'])
+            ->leftJoin('job_company', 'job_recruiting.id', '=', 'job_company.job_id')
+            ->select('job_company.*')
+            ->first();
+        if(empty($job)){
+            return Result::error("暂无相关公司信息", 0);
+        }
+        return Result::success($job['company_id']);
+    }
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function getWebsiteCompanyInfo(array $data): array
+    {
+        $job = JobCompany::where('job_company.website_id', $data['website_id'])
+            ->where('job_company.status', 1)
+            ->where('job_company.id', $data['id'])
+            ->select('job_company.*')
+            ->first();
+        if(empty($job)){
+            return Result::error("暂无相关公司信息", 0);
+        }
+        return Result::success($job);
+    }
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function getWebsiteCompanyList(array $data): array
+    {
+        $job = JobCompany::where('job_company.website_id', $data['website_id'])
+            ->where('job_company.status', 1)
+            ->select('job_company.*')
+            ->get();
+        if(empty($job)){
+            return Result::error("暂无相关公司信息", 0);
+        }
+        return Result::success($job);
+    }
+
+
 }

+ 15 - 0
app/JsonRpc/NewsServiceInterface.php

@@ -212,4 +212,19 @@ interface NewsServiceInterface
      * @return array
      */
     public function getWebsiteLevelJob(array $data):array;
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function getWebsiteCompany(array $data):array;
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function getWebsiteCompanyInfo(array $data):array;
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function getWebsiteCompanyList(array $data):array;
 }

+ 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 = [];
+}