فهرست منبع

Merge branch '20250306_jobrecuiting_fr'

FengR 1 ماه پیش
والد
کامیت
a81fb3d9a1
1فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  1. 6 1
      app/JsonRpc/NewsService.php

+ 6 - 1
app/JsonRpc/NewsService.php

@@ -8743,10 +8743,14 @@ class NewsService implements NewsServiceInterface
         $zwids = $zwids ?? null;
         $count =  JobPosition::when(!empty($zwids), function ($query) use ($zwids) {
             $query->whereIn('zwid', $zwids);
-        })->count();
+        })
+        ->where('zwpid', 0)
+        ->count();
         $position =  JobPosition::when(!empty($zwids), function ($query) use ($zwids) {
             $query->whereIn('zwid', $zwids);
         })
+        ->where('zwpid', 0)
+        ->orderBy('updated_at', 'desc')
         ->offset(($page - 1) * $page_size)
         ->limit($page_size)->get()
         ->map(function ($item) use ($data) {
@@ -8754,6 +8758,7 @@ class NewsService implements NewsServiceInterface
             ->when(!empty($data['childname']), function ($query) use ($data) {
                 $query->where('zwname', 'like', '%' . $data['childname'] . '%'); 
             })
+            ->orderBy('updated_at', 'desc')
             ->get();
             return $item;
         })