From d28723f141dc5d9e31f79e7f6b738e8ecce8e6b5 Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 6 Jan 2026 23:20:41 -0800 Subject: [PATCH] =?UTF-8?q?fix(wallet-service):=20=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E5=9B=BA=E5=AE=9A=E8=B4=A6=E6=88=B7=E7=B1=BB=E5=9E=8B=E6=98=A0?= =?UTF-8?q?=E5=B0=84=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复 getAllSystemAccounts 中 fixedAccountTypes 映射错误: - S0000000001 应为 COST_ACCOUNT (运营1),而非 HQ_COMMUNITY - S0000000002 应为 OPERATION_ACCOUNT (运营2),而非 COST_ACCOUNT - S0000000003 应为 HQ_COMMUNITY (总部储蓄),而非 OPERATION_ACCOUNT 此修复确保固定账户的余额、收入和分类账明细正确对应。 同时移除前端调试日志。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../src/application/services/wallet-application.service.ts | 4 +++- .../features/system-account-report/SystemAccountsTab.tsx | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/backend/services/wallet-service/src/application/services/wallet-application.service.ts b/backend/services/wallet-service/src/application/services/wallet-application.service.ts index 88528c8a..eac08329 100644 --- a/backend/services/wallet-service/src/application/services/wallet-application.service.ts +++ b/backend/services/wallet-service/src/application/services/wallet-application.service.ts @@ -3314,7 +3314,9 @@ export class WalletApplicationService { const transferredStats = await this.prisma.ledgerEntry.groupBy({ by: ['accountSequence'], where: { accountSequence: { in: accountSeqs }, amount: { lt: 0 } }, _sum: { amount: true } }); const receivedMap2 = new Map(receivedStats2.map(s => [s.accountSequence, s._sum.amount])); const transferredMap = new Map(transferredStats.map(s => [s.accountSequence, s._sum.amount])); - const fixedAccountTypes: Record = { 'S0000000001': 'HQ_COMMUNITY', 'S0000000002': 'COST_ACCOUNT', 'S0000000003': 'OPERATION_ACCOUNT', 'S0000000004': 'RWAD_POOL_PENDING', 'S0000000005': 'SHARE_RIGHT_POOL', 'S0000000006': 'FEE_COLLECTION' }; + // [2026-01-07] 修复:修正账户类型映射,与前端 SYSTEM_ACCOUNT_NAMES 保持一致 + // S0000000001=运营1(COST), S0000000002=运营2(OPERATION), S0000000003=总部储蓄(HQ) + const fixedAccountTypes: Record = { 'S0000000001': 'COST_ACCOUNT', 'S0000000002': 'OPERATION_ACCOUNT', 'S0000000003': 'HQ_COMMUNITY', 'S0000000004': 'RWAD_POOL_PENDING', 'S0000000005': 'SHARE_RIGHT_POOL', 'S0000000006': 'FEE_COLLECTION' }; const fixedAccounts: Array<{ accountSequence: string; accountType: string; usdtBalance: string; totalReceived: string; totalTransferred: string; status: string; createdAt: string }> = []; const provinceAccounts: Array<{ accountSequence: string; regionCode: string; regionName: string; usdtBalance: string; totalReceived: string; status: string }> = []; const cityAccounts: Array<{ accountSequence: string; regionCode: string; regionName: string; usdtBalance: string; totalReceived: string; status: string }> = []; diff --git a/frontend/admin-web/src/components/features/system-account-report/SystemAccountsTab.tsx b/frontend/admin-web/src/components/features/system-account-report/SystemAccountsTab.tsx index 39171760..43e9b4eb 100644 --- a/frontend/admin-web/src/components/features/system-account-report/SystemAccountsTab.tsx +++ b/frontend/admin-web/src/components/features/system-account-report/SystemAccountsTab.tsx @@ -350,9 +350,6 @@ function FixedAccountsSection({ data }: { data: SystemAccountReportResponse['fix const accountLedger = allLedgerData.fixedAccountsLedger.find( (item) => item.accountSequence === accountSequence ); - // [2026-01-07] 调试:验证数据匹配是否正确 - console.log('[getAccountLedger] 查找:', accountSequence, '→ 找到:', accountLedger?.accountSequence, '条数:', accountLedger?.ledger?.length); - console.log('[getAccountLedger] 后端返回的账户列表:', allLedgerData.fixedAccountsLedger.map(l => ({ seq: l.accountSequence, type: l.accountType, count: l.ledger?.length }))); return accountLedger?.ledger || []; };