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 43e9b4eb..980491f3 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 @@ -299,14 +299,18 @@ export default function SystemAccountsTab() { * [2026-01-07] 更新:添加查看分类账明细按钮,在卡片下方公共区域显示明细 */ function FixedAccountsSection({ data }: { data: SystemAccountReportResponse['fixedAccounts'] }) { - // [2026-01-07] 更新:使用 SYSTEM_ACCOUNT_NAMES 映射获取正式名称 + // [2026-01-07] 修复:从后端返回数据中读取真实的 accountSequence,而不是硬编码 + // 后端映射:S0000000001=HQ_COMMUNITY, S0000000002=COST_ACCOUNT, S0000000003=OPERATION_ACCOUNT const accounts = [ - { key: 'costAccount', sequence: 'S0000000001', data: data.costAccount }, - { key: 'operationAccount', sequence: 'S0000000002', data: data.operationAccount }, - { key: 'hqCommunity', sequence: 'S0000000003', data: data.hqCommunity }, - { key: 'rwadPoolPending', sequence: 'S0000000004', data: data.rwadPoolPending }, - { key: 'platformFee', sequence: 'S0000000005', data: data.platformFee }, - ]; + { key: 'costAccount', data: data.costAccount }, + { key: 'operationAccount', data: data.operationAccount }, + { key: 'hqCommunity', data: data.hqCommunity }, + { key: 'rwadPoolPending', data: data.rwadPoolPending }, + { key: 'platformFee', data: data.platformFee }, + ].map(item => ({ + ...item, + sequence: item.data?.accountSequence || '', + })); // [2026-01-07] 新增:选中账户和分类账数据 const [selectedAccount, setSelectedAccount] = useState(null); diff --git a/frontend/admin-web/src/types/system-account.types.ts b/frontend/admin-web/src/types/system-account.types.ts index 5c30ee68..56fb90a6 100644 --- a/frontend/admin-web/src/types/system-account.types.ts +++ b/frontend/admin-web/src/types/system-account.types.ts @@ -127,11 +127,13 @@ export interface ExpiredRewardsEntriesResponse { /** * 固定系统账户 + * 注意:账户序列号由后端 wallet-service 的 fixedAccountTypes 映射决定 + * 当前后端映射:S0000000001=HQ_COMMUNITY, S0000000002=COST_ACCOUNT, S0000000003=OPERATION_ACCOUNT */ export interface FixedAccounts { - costAccount: SystemAccountWithBalance | null; // 成本账户 S0000000001 - operationAccount: SystemAccountWithBalance | null; // 运营账户 S0000000002 - hqCommunity: SystemAccountWithBalance | null; // 总部社区 S0000000003 + costAccount: SystemAccountWithBalance | null; // 成本账户 (由后端分配序列号) + operationAccount: SystemAccountWithBalance | null; // 运营账户 (由后端分配序列号) + hqCommunity: SystemAccountWithBalance | null; // 总部社区 (由后端分配序列号) rwadPoolPending: SystemAccountWithBalance | null; // RWAD待发放池 S0000000004 platformFee: SystemAccountWithBalance | null; // 平台手续费 S0000000005 }