LiuJ hai 2 semanas
pai
achega
13b24a5950
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      app/JsonRpc/NewsService.php

+ 3 - 3
app/JsonRpc/NewsService.php

@@ -2290,7 +2290,7 @@ class NewsService implements NewsServiceInterface
             ->leftJoin('user', 'user.id', '=', 'job_hunting.user_id')
             ->leftJoin('website', 'website.id', '=', 'job_hunting.website_id')
             ->select('job_hunting.*', 'user.nickname as nickname', 'user.user_name as username', 'website.website_name as website_name')
-            ->orderBy("id", "desc")
+            ->orderBy("updated_at", "desc")
             ->limit($data['page_size'])
             ->offset(($data['page'] - 1) * $data['page_size'])
             ->get();
@@ -2310,7 +2310,6 @@ class NewsService implements NewsServiceInterface
     public function getJobHuntingApply(array $data): array
     {
         $where = [];
-
         if (isset($data['username']) && !empty($data['username'])) {
             $where[] = ['user.user_name', 'like', '%' . $data['username'] . '%'];
         }
@@ -2331,12 +2330,13 @@ class NewsService implements NewsServiceInterface
             // })
             // ->leftJoin('user', 'user.id', '=', 'job_hunting.user_id') 'user.nickname as nickname',  , 'user.user_name as username'
             ->where('job_enum.egroup', '=', 'income')
+            ->where('job_hunting.status', 2) //已审核
             ->leftJoin('job_hunting', 'job_hunting.id', '=', 'job_resume.hunt_id')
             ->leftJoin('district', 'district.id', '=', 'job_hunting.city_id')
             ->leftJoin('job_enum', 'job_enum.evalue', '=', 'job_hunting.salary')
             ->leftJoin('user', 'job_hunting.user_id', '=', 'user.id')
             ->select('job_resume.*', 'job_hunting.job_name_get as job_name', 'job_hunting.salary as salary', 'district.name as cityname', 'job_enum.ename as salary_name', 'user.nickname as nickname', 'user.user_name as username')
-            ->orderBy("job_resume.updated_at", "desc")
+            ->orderBy("job_hunting.updated_at", "desc")
             ->limit($data['page_size'])
             ->offset(($data['page'] - 1) * $data['page_size'])
             ->get();