style(commission): 顶部卡片精简为直推人数与团队总人数并清除所有一级二级字样
这个提交包含在:
@@ -161,11 +161,14 @@ class Agent extends Commission
|
||||
}
|
||||
|
||||
$targetUserId = $drillUserId;
|
||||
$targetAgent = AgentModel::where('user_id', $targetUserId)->find();
|
||||
$drillUser = [
|
||||
'id' => $targetUser->id,
|
||||
'nickname' => $targetUser->nickname ?: '微信用户',
|
||||
'avatar' => $targetUser->avatar,
|
||||
'parent_user_id' => $targetUser->parent_user_id,
|
||||
'child_user_count_1' => intval($targetAgent->child_user_count_1 ?? 0),
|
||||
'child_user_count_all' => intval($targetAgent->child_user_count_all ?? ($targetAgent->child_user_count_1 ?? 0)),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -328,8 +331,13 @@ class Agent extends Commission
|
||||
if (empty($teamUserIds)) {
|
||||
$selfAgent = AgentModel::where('user_id', $targetUserId)->find();
|
||||
$selfUser = UserModel::where('id', $targetUserId)->find();
|
||||
$teamCount = isset($selfAgent->child_user_count_all) && intval($selfAgent->child_user_count_all) > 0
|
||||
? intval($selfAgent->child_user_count_all)
|
||||
: intval($selfAgent->child_user_count_1 ?? 0);
|
||||
return [
|
||||
'total_count' => 0,
|
||||
'direct_count' => 0,
|
||||
'team_count' => $teamCount,
|
||||
'active_count' => 0,
|
||||
'expiring_count' => 0,
|
||||
'inactive_count' => 0,
|
||||
@@ -397,8 +405,15 @@ class Agent extends Commission
|
||||
->where('createtime', '>=', $monthStart)
|
||||
->sum('amount');
|
||||
|
||||
$directCount = count($teamUserIds);
|
||||
$teamCount = isset($selfAgent->child_user_count_all) && intval($selfAgent->child_user_count_all) > 0
|
||||
? intval($selfAgent->child_user_count_all)
|
||||
: $directCount;
|
||||
|
||||
return [
|
||||
'total_count' => count($teamUserIds),
|
||||
'total_count' => $directCount,
|
||||
'direct_count' => $directCount,
|
||||
'team_count' => $teamCount,
|
||||
'active_count' => $activeCount,
|
||||
'expiring_count' => $expiringCount,
|
||||
'inactive_count' => $inactiveCount,
|
||||
|
||||
在新工单中引用
屏蔽一个用户