|
@@ -18,12 +18,12 @@ class VideoStatController extends CatchController
|
|
|
use UserTrait;
|
|
|
public function __construct(protected readonly VideoStatByCompany $videoStatByCompany)
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public function index(Request $request)
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
if(!$this->isCompanyManager()){
|
|
|
return [];
|
|
|
}
|
|
@@ -32,9 +32,11 @@ class VideoStatController extends CatchController
|
|
|
$is_export = $request->get('is_export');
|
|
|
$where = $this->requestParam($request);
|
|
|
if($is_export){
|
|
|
- $result = $this->videoStatByCompany->where($where)->select('day','video_name','video_id','amount','charge_count','charge_user_num','play_count')->get();
|
|
|
+ $result = $this->videoStatByCompany->where($where)
|
|
|
+ ->select('day','video_name','video_id','amount','charge_count','charge_user_num','play_count', 'click_uv')->get();
|
|
|
}else{
|
|
|
- $result = $this->videoStatByCompany->where($where)->select('day','video_name','video_id','amount','charge_count','charge_user_num','play_count')->paginate($limit);
|
|
|
+ $result = $this->videoStatByCompany->where($where)
|
|
|
+ ->select('day','video_name','video_id','amount','charge_count','charge_user_num','play_count', 'click_uv')->paginate($limit);
|
|
|
}
|
|
|
return $result;
|
|
|
}
|
|
@@ -67,7 +69,7 @@ class VideoStatController extends CatchController
|
|
|
$video_name = $request->get('video_name');
|
|
|
$start_date = $request->get('start_date');
|
|
|
$end_date = $request->get('end_date');
|
|
|
-
|
|
|
+
|
|
|
if(!$end_date){
|
|
|
$end_date = $default_end_time;
|
|
|
}else{
|
|
@@ -86,12 +88,12 @@ class VideoStatController extends CatchController
|
|
|
['day','>=',$start_date->format('Y-m-d')],
|
|
|
['day','<=',$end_date->format('Y-m-d')]
|
|
|
];
|
|
|
-
|
|
|
+
|
|
|
if(trim($video_name)){
|
|
|
$where[] = ['video_name','like','%'.trim($video_name).'%'];
|
|
|
}
|
|
|
return $where;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
}
|