From 6a0515001779297cfa4880bf60f7f37c9256b091 Mon Sep 17 00:00:00 2001 From: hailin Date: Wed, 7 Jan 2026 22:51:16 -0800 Subject: [PATCH] =?UTF-8?q?fix(admin-service):=20=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E5=BC=95=E8=8D=90=E4=BA=BA=E6=95=B0?= =?UTF-8?q?=E6=94=B9=E7=94=A8=E5=AE=9E=E6=97=B6=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 之前 directReferralCount 使用 CDC 同步的预计算字段(值为 0), 现在改为调用 getDirectReferralCount 实时查询 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../src/api/controllers/user-detail.controller.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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, }, };