diff --git a/market/controllers/api/sylive/GroupsStatistics.php b/market/controllers/api/sylive/GroupsStatistics.php index 8c5d5d73..7649156b 100644 --- a/market/controllers/api/sylive/GroupsStatistics.php +++ b/market/controllers/api/sylive/GroupsStatistics.php @@ -68,7 +68,8 @@ class GroupsStatistics extends BaseController $browse = $this->mdSyliveActivityKpidata->count(['activityId' => $activityId, 'kpi' => 'browse']); $subscribe = $this->mdSyliveActivityKpidata->count(['activityId' => $activityId, 'kpi' => 'subscribe']); $watch = $this->mdSyliveActivityKpidata->count(['activityId' => $activityId, 'kpi' => 'watch']); - $order = $this->mdSyliveOrder->count(['activityId' => $activityId, 'status' => 1]); + $beforeOrder = $this->mdSyliveActivityKpidata->count(['activityId' => $activityId, 'kpi' => 'beforeOrder']); + $order = $this->mdSyliveActivityKpidata->count(['activityId' => $activityId, 'kpi' => 'order']); $duration_min = $livePV = $liveUV = $watchDuration = $watchDuration = $pvDuration = 0; if ($channelId) { $re_duration = $this->mdPolyvSession->sum('duration', ['channelId' => $channelId]); @@ -96,7 +97,8 @@ class GroupsStatistics extends BaseController $watch_un < 0 && $watch_un = 0; } $activityData2 = [['name' => '浏览数(人)', 'value' => $browse, 'url' => ''], ['name' => '预约数(人)', 'value' => $subscribe, 'url' => ''] - , ['name' => '订单数(单)', 'value' => $order, 'url' => ''], ['name' => '有效观看(人)', 'value' => $liveUV, 'url' => ''], ['name' => '无效观看(人)', 'value' => $watch_un, 'url' => ''] + , ['name' => '留资数(单)', 'value' => $beforeOrder, 'url' => ''], ['name' => '订单数(单)', 'value' => $order, 'url' => ''] + , ['name' => '有效观看(人)', 'value' => $liveUV, 'url' => ''], ['name' => '无效观看(人)', 'value' => $watch_un, 'url' => ''] , ['name' => '直播时长(分)', 'value' => $duration_min, 'url' => ''], ['name' => '观看数(人次)', 'value' => $livePV, 'url' => ''] , ['name' => '人均观看(分)', 'value' => $watchDuration, 'url' => ''], ['name' => '人均观看(次)', 'value' => $pvDuration, 'url' => '']]; } @@ -115,7 +117,7 @@ class GroupsStatistics extends BaseController } } $data = ['activityId' => $activityId, 'title' => $title, 'activityData1' => ['list' => $activityData1, 'style' => 'width: 50%'] - , 'activityData2' => ['list' => $activityData2, 'style' => 'width: 11.1%'], 'levelData' => $levelData + , 'activityData2' => ['list' => $activityData2, 'style' => 'width: 20%'], 'levelData' => $levelData , 'tableData' => ['days' => $days, 'goods' => $goods, 'levels' => $levels] ]; $this->return_response($data);