fix(admin-service): 用户详情页引荐人数改用实时查询
之前 directReferralCount 使用 CDC 同步的预计算字段(值为 0), 现在改为调用 getDirectReferralCount 实时查询 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
da5bb98cb7
commit
6a05150017
|
|
@ -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.getReferralInfo(accountSequence),
|
||||||
this.userDetailRepository.getPersonalAdoptionCount(accountSequence),
|
this.userDetailRepository.getPersonalAdoptionCount(accountSequence),
|
||||||
this.userDetailRepository.getTeamStats(accountSequence),
|
this.userDetailRepository.getTeamStats(accountSequence),
|
||||||
|
this.userDetailRepository.getDirectReferralCount(accountSequence),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 获取推荐人昵称
|
// 获取推荐人昵称
|
||||||
|
|
@ -109,7 +110,7 @@ export class UserDetailController {
|
||||||
referrerNickname,
|
referrerNickname,
|
||||||
ancestorPath: referralInfo?.ancestorPath?.map((id) => id.toString()).join(',') || null,
|
ancestorPath: referralInfo?.ancestorPath?.map((id) => id.toString()).join(',') || null,
|
||||||
depth: referralInfo?.depth || 0,
|
depth: referralInfo?.depth || 0,
|
||||||
directReferralCount: referralInfo?.directReferralCount || 0,
|
directReferralCount: directReferralCount, // 使用实时查询的值
|
||||||
activeDirectCount: referralInfo?.activeDirectCount || 0,
|
activeDirectCount: referralInfo?.activeDirectCount || 0,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue