From b49776fadb448edcee35b5e83fad2fff92297566 Mon Sep 17 00:00:00 2001 From: hailin Date: Wed, 7 Jan 2026 20:20:54 -0800 Subject: [PATCH] =?UTF-8?q?fix(admin-service):=20=E6=B3=A8=E5=86=8C=20CDC?= =?UTF-8?q?=20=E6=B6=88=E8=B4=B9=E8=80=85=E5=88=B0=20AppModule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CDC 数据无法同步的原因是消费者服务未在 AppModule 中注册。 添加以下 CDC 消费者: - CdcConsumerService (identity 用户数据) - ReferralCdcConsumerService (推荐关系) - WalletCdcConsumerService (钱包账户和流水) - PlantingCdcConsumerService (认种订单和持仓) - AuthorizationCdcConsumerService (授权角色和考核) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- backend/services/admin-service/src/app.module.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/backend/services/admin-service/src/app.module.ts b/backend/services/admin-service/src/app.module.ts index 9b9f82c8..cb7d227e 100644 --- a/backend/services/admin-service/src/app.module.ts +++ b/backend/services/admin-service/src/app.module.ts @@ -34,6 +34,12 @@ import { USER_QUERY_REPOSITORY } from './domain/repositories/user-query.reposito import { UserController } from './api/controllers/user.controller'; import { UserDetailController } from './api/controllers/user-detail.controller'; import { UserEventConsumerService } from './infrastructure/kafka/user-event-consumer.service'; +// CDC Consumer imports +import { CdcConsumerService } from './infrastructure/kafka/cdc-consumer.service'; +import { ReferralCdcConsumerService } from './infrastructure/kafka/referral-cdc-consumer.service'; +import { WalletCdcConsumerService } from './infrastructure/kafka/wallet-cdc-consumer.service'; +import { PlantingCdcConsumerService } from './infrastructure/kafka/planting-cdc-consumer.service'; +import { AuthorizationCdcConsumerService } from './infrastructure/kafka/authorization-cdc-consumer.service'; // User Detail Query imports import { UserDetailQueryRepositoryImpl } from './infrastructure/persistence/repositories/user-detail-query.repository.impl'; import { USER_DETAIL_QUERY_REPOSITORY } from './domain/repositories/user-detail-query.repository'; @@ -141,6 +147,12 @@ import { MaintenanceInterceptor } from './api/interceptors/maintenance.intercept useClass: UserDetailQueryRepositoryImpl, }, UserEventConsumerService, + // CDC Consumers (Debezium) + CdcConsumerService, + ReferralCdcConsumerService, + WalletCdcConsumerService, + PlantingCdcConsumerService, + AuthorizationCdcConsumerService, // System Config { provide: SYSTEM_CONFIG_REPOSITORY,