Pārlūkot izejas kodu

export duanjv 统计

zhaoyang 1 gadu atpakaļ
vecāks
revīzija
3e54a2b1f8

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