market_statistics_1029_3

This commit is contained in:
dengbw
2022-10-29 15:59:45 +08:00
committed by lccsw
parent 59a9c6c49b
commit 49f6f0eaf3
+5 -5
View File
@@ -138,7 +138,7 @@ class Statistics extends BaseController
, 'livePV' => $livePV, 'watchDuration' => $watchDuration];
}
}
$res_user = $this->mdSyliveActivityKpidata->select(['a_id' => $activityId, 'type' => 0], 'id desc', 0, 0, 'distinct(cf_uid) as userId,biz_id');
$res_user = $this->mdSyliveActivityKpidata->select(['a_id' => $activityId, 'type' => 0, 'cf_uid>' => 0], 'id desc', 0, 0, 'distinct(cf_uid) as userId,biz_id');
foreach ($res_user as $k => $v) {
$userId = intval($v['userId']);
$re_user = $this->mdSyliveUser->get(['userId' => $userId, 'status>=' => 0]);
@@ -170,7 +170,7 @@ class Statistics extends BaseController
}
}
}
$consultantData[] = ['consultantName' => $consultantName, 'browse' => $browse, 'subscribe' => $subscribe, 'watch' => $watch
$consultantData[] = ['consultantName' => $consultantName, 'userId' => $userId, 'browse' => $browse, 'subscribe' => $subscribe, 'watch' => $watch
, 'order' => $order, 'livePV' => $livePV, 'watchDuration' => $watchDuration];
}
}
@@ -254,14 +254,14 @@ class Statistics extends BaseController
if ($sort && $order) {
$sort_order = $sort . ' ' . $order;
}
$where = ['activityId' => $activityId, 'status' => 0];
$where = ['activityId' => $activityId, 'status>=' => 0, 'bizId>' => 0];
$count = $this->mdSyliveActivityBiz->count($where);
if ($count) {
$res = $this->mdSyliveActivityBiz->select($where, $sort_order, $page, $limit);
foreach ($res as $v) {
$allConsultant = 0;
$bizId = intval($v['bizId']);
$re_biz = $this->mdSyliveOrganization->get(['organizationId' => $bizId]);
$re_biz = $this->mdSyliveOrganization->get(['organizationId' => $bizId, 'status>=' => 0]);
$bizName = $re_biz ? $re_biz['organizationName'] : '-';
$consultant = $this->mdSyliveActivityKpidata->count(['biz_id' => $bizId, 'type' => 0, 'a_id' => $activityId], 'distinct(cf_uid)');
if ($bizId) {//统计顾问数
@@ -328,7 +328,7 @@ class Statistics extends BaseController
if ($sort && $order) {
$sort_order = $sort . ' ' . $order;
}
$where = ['a_id' => $activityId, 'type' => 0];
$where = ['a_id' => $activityId, 'type' => 0, 'cf_uid>' => 0];
$count = $this->mdSyliveActivityKpidata->count($where, 'distinct(cf_uid)');
if ($count) {
$res = $this->mdSyliveActivityKpidata->select($where, $sort_order, $page, $limit, 'distinct(cf_uid) as userId,biz_id');