diff --git a/backend/services/admin-service/src/api/controllers/user-detail.controller.ts b/backend/services/admin-service/src/api/controllers/user-detail.controller.ts index 03e30ccc..3c424e44 100644 --- a/backend/services/admin-service/src/api/controllers/user-detail.controller.ts +++ b/backend/services/admin-service/src/api/controllers/user-detail.controller.ts @@ -58,10 +58,11 @@ export class UserDetailController { } // 并行获取所有相关数据 - const [referralInfo, personalAdoptions, teamStats] = await Promise.all([ + const [referralInfo, personalAdoptions, teamStats, directReferralCount] = await Promise.all([ this.userDetailRepository.getReferralInfo(accountSequence), this.userDetailRepository.getPersonalAdoptionCount(accountSequence), this.userDetailRepository.getTeamStats(accountSequence), + this.userDetailRepository.getDirectReferralCount(accountSequence), ]); // 获取推荐人昵称 @@ -109,7 +110,7 @@ export class UserDetailController { referrerNickname, ancestorPath: referralInfo?.ancestorPath?.map((id) => id.toString()).join(',') || null, depth: referralInfo?.depth || 0, - directReferralCount: referralInfo?.directReferralCount || 0, + directReferralCount: directReferralCount, // 使用实时查询的值 activeDirectCount: referralInfo?.activeDirectCount || 0, }, };