dyjh 6 년 전
부모
커밋
c5c338ee33
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  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;
         }