diff --git a/backend/services/referral-service/src/api/controllers/team-pre-planting.controller.ts b/backend/services/referral-service/src/api/controllers/team-pre-planting.controller.ts index ccbc2a71..d29349ca 100644 --- a/backend/services/referral-service/src/api/controllers/team-pre-planting.controller.ts +++ b/backend/services/referral-service/src/api/controllers/team-pre-planting.controller.ts @@ -50,7 +50,7 @@ export class TeamPrePlantingController { type: 'object', properties: { selfPrePlantingPortions: { type: 'number', description: '个人预种份数' }, - teamPrePlantingPortions: { type: 'number', description: '团队预种总量(含自己和所有下级)' }, + teamPrePlantingPortions: { type: 'number', description: '团队预种总量(不含自己,仅伞下成员)' }, directReferrals: { type: 'array', items: { @@ -123,9 +123,13 @@ export class TeamPrePlantingController { directReferralStats.sort((a, b) => b.selfPrePlantingPortions - a.selfPrePlantingPortions); } + const selfPortions = myStats?.selfPrePlantingPortions ?? 0; + const teamPortions = myStats?.teamPrePlantingPortions ?? 0; + return { - selfPrePlantingPortions: myStats?.selfPrePlantingPortions ?? 0, - teamPrePlantingPortions: myStats?.teamPrePlantingPortions ?? 0, + selfPrePlantingPortions: selfPortions, + // 团队预种量不含自己,只统计伞下成员 + teamPrePlantingPortions: teamPortions - selfPortions, directReferrals: directReferralStats, }; }