LiuJ 1 tuần trước cách đây
mục cha
commit
99f74a34e9
1 tập tin đã thay đổi với 7 bổ sung0 xóa
  1. 7 0
      app/JsonRpc/NewsService.php

+ 7 - 0
app/JsonRpc/NewsService.php

@@ -3124,6 +3124,13 @@ class NewsService implements NewsServiceInterface
             ->offset(($data['page'] - 1) * $data['page_size'])
             ->get();
         $count = Good::where($where)
+            ->when(!empty($where1), function ($query) use ($where1) {
+                return $query->where($where1);
+            })
+            //status  1待审核2已审核3已拒绝
+            ->when(isset($data['status1']), function ($query) {
+                return $query->whereIn('good.status', [1, 3]);
+            })
             ->leftJoin('district', 'good.city_id', '=', 'district.id')
             ->leftJoin('website', 'good.website_id', '=', 'website.id')
             ->leftJoin('category', 'good.catid', '=', 'category.id')