소스 검색

export duanjv 统计

zhaoyang 1 년 전
부모
커밋
3e54a2b1f8
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 3
      modules/Statistic/Http/Controllers/VideoStatController.php

+ 6 - 3
modules/Statistic/Http/Controllers/VideoStatController.php

@@ -29,10 +29,13 @@ class VideoStatController extends CatchController
         }
 
         $limit = $request->get('limit',15);
+        $is_export = $request->get('is_export');
         $where = $this->requestParam($request);
-
-        $result = $this->videoStatByCompany->where($where)->select('day','video_name','video_id','amount','charge_count','charge_user_num','play_count')->paginate($limit);
-        
+        if($is_export){
+            $result = $this->videoStatByCompany->where($where)->select('day','video_name','video_id','amount','charge_count','charge_user_num','play_count')->get();
+        }else{
+            $result = $this->videoStatByCompany->where($where)->select('day','video_name','video_id','amount','charge_count','charge_user_num','play_count')->paginate($limit);
+        }
         return $result;
     }