diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index f710e8b92..12cee01e5 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -1341,11 +1341,21 @@ class DownloadController extends BaseController { $ids = array_column($data, 'id'); $rows = []; if (count($ids) > 0) { - $rows = M('promote', 'tab_')->field(['id', 'parent_id'])->where(['parent_id' => ['in', $ids]])->select(); + $rows = M('promote', 'tab_') + ->field(['id', 'chain']) + ->where(['chain' => ['like', [$parent['chain'] . $parent['id'] . '/%']], 'level' => ['gt', $parent['level'] + 1]]) + ->select(); } $basicPromotes = []; - foreach ($rows as $row) { - $basicPromotes[$row['id']] = $row['parent_id']; + + $basicPromotes = []; + foreach ($ids as $id) { + foreach ($rows as $row) { + $needChain = $parent['chain'] . $parent['id'] . '/' . $id . '/'; + if (strpos($row['chain'], $needChain) !== false) { + $basicPromotes[$row['id']] = $id; + } + } } $map = [ 'isContainSubs' => true, @@ -2619,6 +2629,7 @@ class DownloadController extends BaseController { } $params['begin_time'] = $map['begin_time']; $params['end_time'] = $map['end_time']; + $promoteRepository = new PromoteRepository(); $createRoleCountList = $promoteRepository->getCreateRoleCountByIds($ids, $params); $createRoleUserCountList = $promoteRepository->getCreateRoleUserCountByIds($ids, $params); diff --git a/Application/Home/View/default/Query/achievement.html b/Application/Home/View/default/Query/achievement.html index b2c1a9bb4..d37eaef80 100644 --- a/Application/Home/View/default/Query/achievement.html +++ b/Application/Home/View/default/Query/achievement.html @@ -130,7 +130,7 @@
- 导出 + 导出 {$pagination}