|
|
@@ -194,7 +194,7 @@ class SharedProsperityUserRepository extends BaseRepository
|
|
194
|
194
|
$list = $this->dao->getDirectByUserId($userId);
|
|
195
|
195
|
if (empty($list)) {
|
|
196
|
196
|
// 没有直推用户,仍然返回统计数据(我的部门总人数和总业绩)
|
|
197
|
|
- $myTeamUserIds = $this->dao->getAllSubordinateUserIds($userId, true);
|
|
|
197
|
+ $myTeamUserIds = $this->dao->getAllSubordinateUserIds($userId);
|
|
198
|
198
|
$myTeamTotalCount = count($myTeamUserIds);
|
|
199
|
199
|
$myTeamPvSum = $this->dao->getTeamPvSumWithSelf($userId);
|
|
200
|
200
|
return [
|
|
|
@@ -227,9 +227,9 @@ class SharedProsperityUserRepository extends BaseRepository
|
|
227
|
227
|
$maxPv = 0;
|
|
228
|
228
|
$maxPvIndex = -1;
|
|
229
|
229
|
foreach ($list as $index => &$item) {
|
|
230
|
|
- $teamUserIds = $this->dao->getAllSubordinateUserIds($item['user_id'], true);
|
|
|
230
|
+ $teamUserIds = $this->dao->getAllSubordinateUserIds($item['user_id'],false,4);
|
|
231
|
231
|
$teamTotalCount = count($teamUserIds);
|
|
232
|
|
- $teamPvSum = $this->dao->getTeamPvSumWithSelf($item['user_id']);
|
|
|
232
|
+ $teamPvSum = $this->dao->getTeamPvSum($item['user_id'],4);
|
|
233
|
233
|
$item['team_total_count'] = $teamTotalCount;
|
|
234
|
234
|
$item['team_pv_sum'] = $teamPvSum;
|
|
235
|
235
|
// 补充用户信息
|
|
|
@@ -264,9 +264,9 @@ class SharedProsperityUserRepository extends BaseRepository
|
|
264
|
264
|
$smallDepartment = $list;
|
|
265
|
265
|
}
|
|
266
|
266
|
// 计算统计数据
|
|
267
|
|
- $myTeamUserIds = $this->dao->getAllSubordinateUserIds($userId, true);
|
|
|
267
|
+ $myTeamUserIds = $this->dao->getAllSubordinateUserIds($userId);
|
|
268
|
268
|
$myTeamTotalCount = count($myTeamUserIds);
|
|
269
|
|
- $myTeamPvSum = $this->dao->getTeamPvSumWithSelf($userId);
|
|
|
269
|
+ $myTeamPvSum = $this->dao->getTeamPvSum($userId);
|
|
270
|
270
|
$smallDepartmentPvSum = 0;
|
|
271
|
271
|
foreach ($smallDepartment as $item) {
|
|
272
|
272
|
$smallDepartmentPvSum += $item['team_pv_sum'];
|