dyjh 6 anni fa
parent
commit
cd33ac14dc
1 ha cambiato i file con 4 aggiunte e 3 eliminazioni
  1. 4 3
      app/Http/Controllers/Api/V1/AlbumBossController.php

+ 4 - 3
app/Http/Controllers/Api/V1/AlbumBossController.php

xqd xqd
@@ -479,7 +479,7 @@ class AlbumBossController extends Controller
             ['store_id', $store_id],
             ['updated_at','>=',$start],
             ['updated_at','<=',$end]
-        ])->orderByDesc('id')->groupBy('open_id')->get();
+        ])->orderByDesc('id')->groupBy('open_id')->get()->toArray();
         $totalCustomerCount = count($totalCustomer);
         return $this->api(compact('totalCustomerCount', 'newCustomerCount', 'shareCount', 'downloadCount', 'customerFollow'));
     }
@@ -543,9 +543,10 @@ class AlbumBossController extends Controller
             ['action', 8],
         ])->orderByDesc('id')->count();
 
-        $totalCustomerCount = AlbumWatchRecord::where([
+        $totalCustomer = AlbumWatchRecord::where([
             ['store_id', $store_id],
-        ])->orderByDesc('id')->groupBy('open_id')->count();
+        ])->orderByDesc('id')->groupBy('open_id')->get()->toArray();
+        $totalCustomerCount = count($totalCustomer);
         return $this->api(compact('totalCustomerCount', 'shareCount', 'customerFollow'));
     }