This commit is contained in:
xiaoyu
2024-01-19 12:36:20 +08:00
parent 48f8b0bec9
commit d8bbb32a0f
@@ -157,7 +157,7 @@ class GroupsStatistics extends BaseController
if ($day) {//按天搜索
$createTimeStart = strtotime($day . ' 00:00:00');
$createTimeEnd = strtotime($day . ' 23:59:59');
$where = $where_order = ['activityId' => $activityId, 'day' => $day, "$levelId>" => 0, 'itemId>' => 0];
$where = $where_order = ['activityId' => $activityId, 'day' => $day, "$levelId>" => 0, 'itemId>' => 0, "cfUserId in (SELECT userId FROM lc_market_sylive_groups_user WHERE activityId = {$activityId} and status = 0)" => null];
$where_sort = ['activityId' => $activityId, 'day' => $day, "$levelId>" => 0, 'kpi' => $sort];
if ($sort == 'order') {
if ($itemId) {
@@ -172,7 +172,7 @@ class GroupsStatistics extends BaseController
$res = $this->mdSyliveActivityKpidata->select_groupby($levelId, $where, "total {$order},id desc", $page, $limit, "$levelId,count(id) as total");
foreach ($res as $v) {
$groupsId = intval($v[$levelId]);
$re_gro = $this->mdSyliveGroups->get(['groupsId' => $groupsId, 'activityId' => $activityId, 'status>=' => 0]);
$re_gro = $this->mdSyliveGroups->get(['groupsId' => $groupsId, 'activityId' => $activityId, 'status' => 0]);
$groupsName = $re_gro ? $re_gro['groupsName'] : '-';
$where_sort[$levelId] = $groupsId;
if ($sort == 'browse') {