diff --git a/home/controllers/h5/market/sylive2/Stic.php b/home/controllers/h5/market/sylive2/Stic.php index b026ceb8..4fc19276 100644 --- a/home/controllers/h5/market/sylive2/Stic.php +++ b/home/controllers/h5/market/sylive2/Stic.php @@ -98,6 +98,7 @@ class Stic extends Admin $biz_total = $this->groups_model->count($where); $where = [ 'activityId' => $this->a_id, + 'bizId >' => 0, 'status' => 0, ]; $gw_total = $this->groups_user_model->count($where); diff --git a/market/controllers/api/sylive/GroupsStatistics.php b/market/controllers/api/sylive/GroupsStatistics.php index 7534561a..2f23d70a 100644 --- a/market/controllers/api/sylive/GroupsStatistics.php +++ b/market/controllers/api/sylive/GroupsStatistics.php @@ -89,7 +89,7 @@ class GroupsStatistics extends BaseController } } $consultant = $this->mdSyliveActivityKpidata->count(['activityId' => $activityId, "cfUserId in (SELECT userId FROM lc_market_sylive_groups_user WHERE activityId = {$activityId} and bizId > 0 and status = 0)" => null], 'cfUserId'); - $allConsultant = $this->mdSyliveGroupsUser->count(['activityId' => $activityId, 'status' => 0]); + $allConsultant = $this->mdSyliveGroupsUser->count(['activityId' => $activityId, 'status' => 0, 'bizId >' => 0]); $consultant > $allConsultant && $allConsultant = $consultant; $bizs = $this->mdSyliveGroups->count(['activityId' => $activityId, 'ifBiz' => 1, 'status>=' => 0]); $activityData1 = [['name' => '参与门店数', 'value' => $bizs] @@ -209,7 +209,7 @@ class GroupsStatistics extends BaseController $orderTotal = $this->mdSyliveActivityKpidata->count($where_order); } $consultant = $this->mdSyliveActivityKpidata->count([$levelId => $groupsId, 'activityId' => $activityId, "cfUserId in (SELECT userId FROM lc_market_sylive_groups_user WHERE activityId = {$activityId} and bizId > 0 and status = 0)" => null], 'cfUserId'); - $allConsultant = $this->mdSyliveGroupsUser->count([$levelId => $groupsId, 'activityId' => $activityId, 'status' => 0]); + $allConsultant = $this->mdSyliveGroupsUser->count([$levelId => $groupsId, 'activityId' => $activityId, 'status' => 0, 'bizId >' => 0]); $consultant > $allConsultant && $allConsultant = $consultant; $livePV = $watchDuration = 0; if ($channelId) { @@ -258,7 +258,7 @@ class GroupsStatistics extends BaseController $groupsName = $v['groupsName'] ? $v['groupsName'] : '-'; } $consultant = $this->mdSyliveActivityKpidata->count([$levelId => $groupsId, 'activityId' => $activityId, "cfUserId in (SELECT userId FROM lc_market_sylive_groups_user WHERE activityId = {$activityId} and bizId > 0 and status = 0)" => null], 'cfUserId'); - $allConsultant = $this->mdSyliveGroupsUser->count([$levelId => $groupsId, 'activityId' => $activityId, 'status' => 0]); + $allConsultant = $this->mdSyliveGroupsUser->count([$levelId => $groupsId, 'activityId' => $activityId, 'status' => 0, 'bizId >' => 0]); $consultant > $allConsultant && $allConsultant = $consultant; $livePV = $watchDuration = 0; if ($channelId) { @@ -580,7 +580,7 @@ class GroupsStatistics extends BaseController $orderTotal = $this->mdSyliveActivityKpidata->count($where_order); } $consultant = $this->mdSyliveActivityKpidata->count(['bizId' => $bizId, 'activityId' => $activityId, "cfUserId in (SELECT userId FROM lc_market_sylive_groups_user WHERE activityId = {$activityId} and bizId > 0 and status = 0)" => null], 'cfUserId'); - $allConsultant = $this->mdSyliveGroupsUser->count(['bizId' => $bizId, 'activityId' => $activityId, 'status' => 0]); + $allConsultant = $this->mdSyliveGroupsUser->count(['bizId' => $bizId, 'activityId' => $activityId, 'status' => 0, 'bizId >' => 0]); $consultant > $allConsultant && $allConsultant = $consultant; $livePV = $watchDuration = 0; if ($channelId) {