From 1b8791fe5d847286b83c5246436f8d100ddb553d Mon Sep 17 00:00:00 2001 From: hailin Date: Mon, 12 Jan 2026 05:09:01 -0800 Subject: [PATCH] =?UTF-8?q?fix(contribution-service):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=20unlockedBonusTiers=20=E5=AD=97=E6=AE=B5=E5=88=B0=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 事件和 API 返回中缺少 unlockedBonusTiers 字段,导致 mining-admin-service 无法正确显示团队奖励解锁状态 Co-Authored-By: Claude Opus 4.5 --- .../src/api/controllers/admin.controller.ts | 4 ++++ .../src/domain/events/contribution-account-synced.event.ts | 2 ++ 2 files changed, 6 insertions(+) diff --git a/backend/services/contribution-service/src/api/controllers/admin.controller.ts b/backend/services/contribution-service/src/api/controllers/admin.controller.ts index 2d4b7577..31bcba30 100644 --- a/backend/services/contribution-service/src/api/controllers/admin.controller.ts +++ b/backend/services/contribution-service/src/api/controllers/admin.controller.ts @@ -36,6 +36,7 @@ export class AdminController { hasAdopted: true, directReferralAdoptedCount: true, unlockedLevelDepth: true, + unlockedBonusTiers: true, createdAt: true, updatedAt: true, }, @@ -52,6 +53,7 @@ export class AdminController { hasAdopted: acc.hasAdopted, directReferralAdoptedCount: acc.directReferralAdoptedCount, unlockedLevelDepth: acc.unlockedLevelDepth, + unlockedBonusTiers: acc.unlockedBonusTiers, createdAt: acc.createdAt, updatedAt: acc.updatedAt, })), @@ -78,6 +80,7 @@ export class AdminController { hasAdopted: true, directReferralAdoptedCount: true, unlockedLevelDepth: true, + unlockedBonusTiers: true, createdAt: true, }, }); @@ -103,6 +106,7 @@ export class AdminController { acc.hasAdopted, acc.directReferralAdoptedCount, acc.unlockedLevelDepth, + acc.unlockedBonusTiers, acc.createdAt, ); diff --git a/backend/services/contribution-service/src/domain/events/contribution-account-synced.event.ts b/backend/services/contribution-service/src/domain/events/contribution-account-synced.event.ts index 4d1c4064..b9e1523c 100644 --- a/backend/services/contribution-service/src/domain/events/contribution-account-synced.event.ts +++ b/backend/services/contribution-service/src/domain/events/contribution-account-synced.event.ts @@ -16,6 +16,7 @@ export class ContributionAccountSyncedEvent { public readonly hasAdopted: boolean, public readonly directReferralAdoptedCount: number, public readonly unlockedLevelDepth: number, + public readonly unlockedBonusTiers: number, public readonly createdAt: Date, ) {} @@ -31,6 +32,7 @@ export class ContributionAccountSyncedEvent { hasAdopted: this.hasAdopted, directReferralAdoptedCount: this.directReferralAdoptedCount, unlockedLevelDepth: this.unlockedLevelDepth, + unlockedBonusTiers: this.unlockedBonusTiers, createdAt: this.createdAt.toISOString(), }; }