Browse Source

统计问题

rkljw 1 tháng trước cách đây
mục cha
commit
76018446bf
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      app/JsonRpc/WebsiteService.php

+ 2 - 1
app/JsonRpc/WebsiteService.php

@@ -53,11 +53,12 @@ class WebsiteService implements WebsiteServiceInterface
                 $query->whereJsonContains("website.city_arr_id", intval($data['city_id']));
             }
         });
+        $count = $resultWwhere->count();
         $result = $resultWwhere->leftJoin("website_column", "website.website_column_id", "website_column.id")
             ->leftJoin("district", "district.id", "website.city_id")
             ->select("website.*", "website_column.column_name", "district.name as city_name")
             ->limit($data['pageSize'])->offset(($data['page'] - 1) * $data['pageSize'])->orderBy("website.id", "desc")->get();
-        $count = $resultWwhere->count();
+
         if (empty($result)) {
             return Result::error("没有数据", 0);
         }