dyjh 6 年之前
父节点
当前提交
77d5d5c5dd
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      app/Http/Controllers/Api/V1/AlbumBossController.php

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

xqd
@@ -296,12 +296,13 @@ class AlbumBossController extends Controller
             ['updated_at','<=',$end]
         ])->orderByDesc('id')->count();
 
-        $totalCustomerCount = AlbumWatchRecord::where([
+        $totalCustomer = AlbumWatchRecord::where([
             ['agent_id', $data['agent_id']],
             ['store_id', $data['store_id']],
             ['updated_at','>=',$start],
             ['updated_at','<=',$end]
-        ])->orderByDesc('id')->groupBy('open_id')->count();
+        ])->orderByDesc('id')->groupBy('open_id')->all();
+        $totalCustomerCount = count($totalCustomer);
 
         return $this->api(compact('shareCount', 'totalCustomerCount', 'newCustomerCount', 'downloadCount', 'favoriteCount'));
     }