瀏覽代碼

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;
     }