diff --git a/backend/services/reporting-service/src/infrastructure/external/reward-service/reward-service.client.ts b/backend/services/reporting-service/src/infrastructure/external/reward-service/reward-service.client.ts index 73565245..151e5a67 100644 --- a/backend/services/reporting-service/src/infrastructure/external/reward-service/reward-service.client.ts +++ b/backend/services/reporting-service/src/infrastructure/external/reward-service/reward-service.client.ts @@ -70,9 +70,11 @@ export interface AllRewardTypeSummaries { } // [2026-01-06] 新增:收益记录条目 +// [2026-02-05] 更新:添加 sourceAccountSequence 字段 export interface RewardEntryDTO { id: string; accountSequence: string; + sourceAccountSequence: string | null; // 来源用户账户序列号 sourceOrderId: string; rightType: string; rewardStatus: string; diff --git a/backend/services/reward-service/src/application/services/reward-application.service.ts b/backend/services/reward-service/src/application/services/reward-application.service.ts index af7bb5b9..2bb0a8db 100644 --- a/backend/services/reward-service/src/application/services/reward-application.service.ts +++ b/backend/services/reward-service/src/application/services/reward-application.service.ts @@ -1333,6 +1333,7 @@ export class RewardApplicationService { entries: Array<{ id: string; accountSequence: string; + sourceAccountSequence: string | null; // [2026-02-05] 新增:来源用户账户序列号 sourceOrderId: string; rightType: string; rewardStatus: string; @@ -1376,6 +1377,8 @@ export class RewardApplicationService { entries: entries.map(entry => ({ id: entry.id.toString(), accountSequence: entry.accountSequence, + // [2026-02-05] 新增:返回来源用户的账户序列号 + sourceAccountSequence: entry.sourceAccountSequence ?? null, sourceOrderId: entry.sourceOrderNo, rightType: entry.rightType, rewardStatus: entry.rewardStatus, 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 ccc25696..16f26ca0 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 @@ -1600,6 +1600,8 @@ function RewardTypeSummarySection({ 时间 账户 + {/* [2026-02-05] 新增:来源用户列,显示收益来自哪个用户的认种 */} + 来源用户 订单号 金额 (绿积分) 状态 @@ -1611,6 +1613,8 @@ function RewardTypeSummarySection({ {new Date(entry.createdAt).toLocaleString('zh-CN')} {/* [2026-01-07] 更新:使用 getAccountDisplayName 显示账户名称和编码 */} {getAccountDisplayName(entry.accountSequence)} + {/* [2026-02-05] 新增:显示来源用户账户序列号 */} + {entry.sourceAccountSequence ?? '-'} {entry.sourceOrderId} {formatAmount(entry.usdtAmount)} diff --git a/frontend/admin-web/src/types/system-account.types.ts b/frontend/admin-web/src/types/system-account.types.ts index 704fd84a..4b4caf79 100644 --- a/frontend/admin-web/src/types/system-account.types.ts +++ b/frontend/admin-web/src/types/system-account.types.ts @@ -316,6 +316,7 @@ export const FEE_TYPE_LABELS: Record = { export interface RewardEntryDTO { id: string; accountSequence: string; + sourceAccountSequence: string | null; // [2026-02-05] 新增:来源用户账户序列号 sourceOrderId: string; rightType: string; rewardStatus: string; @@ -659,9 +660,9 @@ export function getAccountDisplayName(accountSequence: string): string { } } } - // 检查是否是7位数字的区域账户序列号(如 8330100 或 9330000) + // 检查是否是7位数字的区域账户序列号(如 7440000省团队、8330100市区域、9330000省区域) if (/^\d{7}$/.test(accountSequence)) { - // 8开头是市区域账户,9开头是省区域账户 + // 7开头是省团队账户,8开头是市区域账户,9开头是省区域账户 const prefix = accountSequence.charAt(0); const regionCode = accountSequence.substring(1); // 后6位是区域代码 const provinceCode = regionCode.substring(0, 2); @@ -677,7 +678,10 @@ export function getAccountDisplayName(accountSequence: string): string { if (provinceName) { const shortProvinceName = provinceName.replace(/省|市|自治区|特别行政区|壮族|回族|维吾尔/g, ''); - if (prefix === '9') { + if (prefix === '7') { + // [2026-02-05] 新增:省团队账户(7开头) + return `${shortProvinceName}省团队 (${accountSequence})`; + } else if (prefix === '9') { // 省区域账户 return `${shortProvinceName}省级 (${accountSequence})`; } else if (prefix === '8') {