From 898521d23669c4cd5cfd5f306225cd3f680f5e8c Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 6 Jan 2026 09:30:45 -0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=90=8C=E6=AD=A5=E6=89=8B=E7=BB=AD?= =?UTF-8?q?=E8=B4=B9=E5=BD=92=E9=9B=86=E8=B4=A6=E6=88=B7=E5=88=B0=E6=89=80?= =?UTF-8?q?=E6=9C=89=E7=9B=B8=E5=85=B3=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - identity-service: seed.ts 添加 S0000000005 和 S0000000006 - authorization-service: 枚举添加 SHARE_RIGHT_POOL 和 FEE_COLLECTION - authorization-service: 初始化固定账户列表添加新账户 - reporting-service: 修复账户类型映射 (PLATFORM_FEE -> FEE_COLLECTION) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../system-account-application.service.ts | 4 +++- .../src/domain/enums/index.ts | 10 ++++++---- backend/services/identity-service/prisma/seed.ts | 16 +++++++++++++++- .../system-account-report-application.service.ts | 5 +++-- 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/backend/services/authorization-service/src/application/services/system-account-application.service.ts b/backend/services/authorization-service/src/application/services/system-account-application.service.ts index 2ec40d75..7d2ed3b0 100644 --- a/backend/services/authorization-service/src/application/services/system-account-application.service.ts +++ b/backend/services/authorization-service/src/application/services/system-account-application.service.ts @@ -84,10 +84,12 @@ export class SystemAccountApplicationService implements OnModuleInit { */ async initializeFixedAccounts(): Promise { const fixedAccountTypes = [ + SystemAccountType.HQ_COMMUNITY, SystemAccountType.COST_ACCOUNT, SystemAccountType.OPERATION_ACCOUNT, - SystemAccountType.HQ_COMMUNITY, SystemAccountType.RWAD_POOL_PENDING, + SystemAccountType.SHARE_RIGHT_POOL, + SystemAccountType.FEE_COLLECTION, ] for (const accountType of fixedAccountTypes) { diff --git a/backend/services/authorization-service/src/domain/enums/index.ts b/backend/services/authorization-service/src/domain/enums/index.ts index 772e73a2..604e3787 100644 --- a/backend/services/authorization-service/src/domain/enums/index.ts +++ b/backend/services/authorization-service/src/domain/enums/index.ts @@ -51,10 +51,12 @@ export enum RegionType { // 系统账户类型 export enum SystemAccountType { - COST_ACCOUNT = 'COST_ACCOUNT', // 成本账户 - OPERATION_ACCOUNT = 'OPERATION_ACCOUNT', // 运营账户 - HQ_COMMUNITY = 'HQ_COMMUNITY', // 总部社区账户 - RWAD_POOL_PENDING = 'RWAD_POOL_PENDING', // RWAD矿池待注入 + COST_ACCOUNT = 'COST_ACCOUNT', // 成本账户 (S0000000002) + OPERATION_ACCOUNT = 'OPERATION_ACCOUNT', // 运营账户 (S0000000003) + HQ_COMMUNITY = 'HQ_COMMUNITY', // 总部社区账户 (S0000000001) + RWAD_POOL_PENDING = 'RWAD_POOL_PENDING', // RWAD矿池待注入 (S0000000004) + SHARE_RIGHT_POOL = 'SHARE_RIGHT_POOL', // 分享权益池 (S0000000005) + FEE_COLLECTION = 'FEE_COLLECTION', // 手续费归集账户 (S0000000006) SYSTEM_PROVINCE = 'SYSTEM_PROVINCE', // 系统省账户(无授权时) SYSTEM_CITY = 'SYSTEM_CITY', // 系统市账户(无授权时) } diff --git a/backend/services/identity-service/prisma/seed.ts b/backend/services/identity-service/prisma/seed.ts index abd0e214..b3f75607 100644 --- a/backend/services/identity-service/prisma/seed.ts +++ b/backend/services/identity-service/prisma/seed.ts @@ -5,7 +5,7 @@ const prisma = new PrismaClient(); // ============================================ // 系统账户定义 -// 系统账户使用特殊序列号格式: S + 00000 + 序号 (S0000000001 ~ S0000000004) +// 系统账户使用特殊序列号格式: S + 00000 + 序号 (S0000000001 ~ S0000000006) // ============================================ // ============================================ // 管理员账户定义 @@ -51,6 +51,20 @@ const SYSTEM_ACCOUNTS = [ }, { userId: BigInt(5), + accountSequence: 'S0000000005', // 分享权益池账户 + nickname: '分享权益池账户', + referralCode: 'SHARE005', + status: 'SYSTEM', + }, + { + userId: BigInt(6), + accountSequence: 'S0000000006', // 手续费归集账户 + nickname: '手续费归集账户', + referralCode: 'FEE00006', + status: 'SYSTEM', + }, + { + userId: BigInt(7), accountSequence: 'D25129999999', // 种子用户 (特殊序号,区别于真实用户) nickname: '种子用户', referralCode: 'SEED01', diff --git a/backend/services/reporting-service/src/application/services/system-account-report-application.service.ts b/backend/services/reporting-service/src/application/services/system-account-report-application.service.ts index cae1ea67..3a70f17c 100644 --- a/backend/services/reporting-service/src/application/services/system-account-report-application.service.ts +++ b/backend/services/reporting-service/src/application/services/system-account-report-application.service.ts @@ -76,11 +76,12 @@ export interface SystemAccountReportResponse { * 固定账户类型映射 */ const FIXED_ACCOUNT_TYPES: Record = { + HQ_COMMUNITY: 'hqCommunity', COST_ACCOUNT: 'costAccount', OPERATION_ACCOUNT: 'operationAccount', - HQ_COMMUNITY: 'hqCommunity', RWAD_POOL_PENDING: 'rwadPoolPending', - PLATFORM_FEE: 'platformFee', + SHARE_RIGHT_POOL: 'shareRightPool', + FEE_COLLECTION: 'feeCollection', }; @Injectable()