dyjh 6 years ago
parent
commit
c5c338ee33
1 changed files with 1 additions and 2 deletions
  1. 1 2
      app/Http/Controllers/Api/V1/AlbumController.php

+ 1 - 2
app/Http/Controllers/Api/V1/AlbumController.php

xqd
@@ -1038,8 +1038,7 @@ class AlbumController extends Controller
         $cat = AlbumCatModel::where([['store_id',$store_id],['parent_id',$parent_id]])->get(['name','id'])->toArray();
         $total = 0;
         foreach ($cat as $key => $val) {
-            $count = CustomerCatRecordModel::where([['agent_id',$user_agent->id],['store_id',$store_id],['open_id',$open_id],['cat_id',$val['id']],['updated_at','>=',$start],['updated_at','<=',$end]])->get();
-            dd($user_agent);
+            $count = CustomerCatRecordModel::where([['agent_id',$user_agent->id],['store_id',$store_id],['open_id',$open_id],['cat_id',$val['id']],['updated_at','>=',$start],['updated_at','<=',$end]])->count();
             $total += $count;
             $cat[$key]['num'] = $count;
         }