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 4a16576b..bfc70f2f 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 @@ -31,6 +31,7 @@ export interface RegionAccountInfo { regionName: string; usdtBalance: string; totalReceived: string; + totalTransferred: string; // [2026-01-07] 新增:累计转出 status: string; } @@ -52,6 +53,7 @@ export interface SystemAccountReportResponse { summary: { totalBalance: string; totalReceived: string; + totalTransferred: string; // [2026-01-07] 新增:累计转出 count: number; }; }; @@ -61,6 +63,7 @@ export interface SystemAccountReportResponse { summary: { totalBalance: string; totalReceived: string; + totalTransferred: string; // [2026-01-07] 新增:累计转出 count: number; }; }; @@ -148,7 +151,7 @@ export class SystemAccountReportApplicationService { */ async getProvinceAccountsSummary(): Promise<{ accounts: RegionAccountInfo[]; - summary: { totalBalance: string; totalReceived: string; count: number }; + summary: { totalBalance: string; totalReceived: string; totalTransferred: string; count: number }; }> { const allSystemAccounts = await this.walletServiceClient.getAllSystemAccounts(); return this.assembleRegionSummary(allSystemAccounts.provinceAccounts); @@ -159,7 +162,7 @@ export class SystemAccountReportApplicationService { */ async getCityAccountsSummary(): Promise<{ accounts: RegionAccountInfo[]; - summary: { totalBalance: string; totalReceived: string; count: number }; + summary: { totalBalance: string; totalReceived: string; totalTransferred: string; count: number }; }> { const allSystemAccounts = await this.walletServiceClient.getAllSystemAccounts(); return this.assembleRegionSummary(allSystemAccounts.cityAccounts); @@ -320,19 +323,22 @@ export class SystemAccountReportApplicationService { /** * 组装区域账户汇总 + * [2026-01-07] 更新:添加 totalTransferred 累计转出统计 */ private assembleRegionSummary( accounts: RegionAccountInfo[], ): { accounts: RegionAccountInfo[]; - summary: { totalBalance: string; totalReceived: string; count: number }; + summary: { totalBalance: string; totalReceived: string; totalTransferred: string; count: number }; } { let totalBalance = 0; let totalReceived = 0; + let totalTransferred = 0; for (const account of accounts) { totalBalance += parseFloat(account.usdtBalance) || 0; totalReceived += parseFloat(account.totalReceived) || 0; + totalTransferred += parseFloat(account.totalTransferred) || 0; } return { @@ -340,6 +346,7 @@ export class SystemAccountReportApplicationService { summary: { totalBalance: totalBalance.toFixed(8), totalReceived: totalReceived.toFixed(8), + totalTransferred: totalTransferred.toFixed(8), count: accounts.length, }, }; diff --git a/backend/services/reporting-service/src/infrastructure/external/wallet-service/wallet-service.client.ts b/backend/services/reporting-service/src/infrastructure/external/wallet-service/wallet-service.client.ts index e6d39fcc..013e9e66 100644 --- a/backend/services/reporting-service/src/infrastructure/external/wallet-service/wallet-service.client.ts +++ b/backend/services/reporting-service/src/infrastructure/external/wallet-service/wallet-service.client.ts @@ -47,6 +47,7 @@ export interface SystemAccountBalance { } // [2026-01-05] 新增:所有系统账户响应类型 +// [2026-01-07] 更新:省/市区域账户添加 totalTransferred 字段 export interface AllSystemAccountsResponse { fixedAccounts: Array<{ accountSequence: string; @@ -63,6 +64,7 @@ export interface AllSystemAccountsResponse { regionName: string; usdtBalance: string; totalReceived: string; + totalTransferred: string; // [2026-01-07] 新增:累计转出 status: string; }>; cityAccounts: Array<{ @@ -71,6 +73,7 @@ export interface AllSystemAccountsResponse { regionName: string; usdtBalance: string; totalReceived: string; + totalTransferred: string; // [2026-01-07] 新增:累计转出 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 107cc00c..344e3b55 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 @@ -470,6 +470,7 @@ function FixedAccountsSection({ data }: { data: SystemAccountReportResponse['fix /** * 区域账户汇总区域 * [2026-01-05] 更新:USDT改为绿积分 + * [2026-01-07] 更新:增加累计转出显示 */ function RegionAccountsSection({ data, type }: { data: RegionAccountsSummary; type: 'province' | 'city' }) { const typeLabel = type === 'province' ? '省' : '市'; @@ -492,6 +493,11 @@ function RegionAccountsSection({ data, type }: { data: RegionAccountsSummary; ty 累计收入 {formatAmount(data.summary.totalReceived)} 绿积分 + {/* [2026-01-07] 新增:累计转出 */} +