|
|
@@ -189,7 +189,7 @@ class SharedProsperityUserRepository extends BaseRepository
|
|
189
|
189
|
$list = $this->dao->getDirectByUserId($userId);
|
|
190
|
190
|
if (empty($list)) {
|
|
191
|
191
|
// 没有直推用户,仍然返回统计数据(我的部门总人数和总业绩)
|
|
192
|
|
- $myTeamUserIds = $this->dao->getAllSubordinateUserIds($userId, true);
|
|
|
192
|
+ $myTeamUserIds = $this->dao->getAllSubordinateUserIds($userId);
|
|
193
|
193
|
$myTeamTotalCount = count($myTeamUserIds);
|
|
194
|
194
|
$myTeamPvSum = $this->dao->getTeamPvSumWithSelf($userId);
|
|
195
|
195
|
return [
|
|
|
@@ -222,9 +222,9 @@ class SharedProsperityUserRepository extends BaseRepository
|
|
222
|
222
|
$maxPv = 0;
|
|
223
|
223
|
$maxPvIndex = -1;
|
|
224
|
224
|
foreach ($list as $index => &$item) {
|
|
225
|
|
- $teamUserIds = $this->dao->getAllSubordinateUserIds($item['user_id'], true);
|
|
|
225
|
+ $teamUserIds = $this->dao->getAllSubordinateUserIds($item['user_id'],false,4);
|
|
226
|
226
|
$teamTotalCount = count($teamUserIds);
|
|
227
|
|
- $teamPvSum = $this->dao->getTeamPvSumWithSelf($item['user_id']);
|
|
|
227
|
+ $teamPvSum = $this->dao->getTeamPvSum($item['user_id'],4);
|
|
228
|
228
|
$item['team_total_count'] = $teamTotalCount;
|
|
229
|
229
|
$item['team_pv_sum'] = $teamPvSum;
|
|
230
|
230
|
// 补充用户信息
|
|
|
@@ -259,9 +259,9 @@ class SharedProsperityUserRepository extends BaseRepository
|
|
259
|
259
|
$smallDepartment = $list;
|
|
260
|
260
|
}
|
|
261
|
261
|
// 计算统计数据
|
|
262
|
|
- $myTeamUserIds = $this->dao->getAllSubordinateUserIds($userId, true);
|
|
|
262
|
+ $myTeamUserIds = $this->dao->getAllSubordinateUserIds($userId);
|
|
263
|
263
|
$myTeamTotalCount = count($myTeamUserIds);
|
|
264
|
|
- $myTeamPvSum = $this->dao->getTeamPvSumWithSelf($userId);
|
|
|
264
|
+ $myTeamPvSum = $this->dao->getTeamPvSum($userId);
|
|
265
|
265
|
$smallDepartmentPvSum = 0;
|
|
266
|
266
|
foreach ($smallDepartment as $item) {
|
|
267
|
267
|
$smallDepartmentPvSum += $item['team_pv_sum'];
|