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 94212252..d411cc63 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 @@ -1343,6 +1343,12 @@ export class RewardApplicationService { createdAt: string; claimedAt: string | null; expiredAt: string | null; + // [2026-03-13] 新增:返回 memo 字段,用于前端在 sourceAccountSequence 为空时从 memo 解析来源用户。 + // 背景:planting-service 发出的 Kafka 事件未携带 accountSequence,导致历史记录 + // source_account_sequence 列全部为 NULL;但 memo 中已记录了来源用户信息 + // (格式:'市团队权益(441300):来自用户D26031300003的认种'), + // 前端通过正则 /来自用户([^\s的]+)/ 从中提取账户序列号展示。 + memo: string | null; }>; total: number; page: number; @@ -1388,6 +1394,7 @@ export class RewardApplicationService { createdAt: entry.createdAt.toISOString(), claimedAt: entry.claimedAt?.toISOString() ?? null, expiredAt: entry.expiredAt?.toISOString() ?? null, + memo: entry.memo ?? null, // [2026-03-13] 新增:透传 memo 供前端解析来源用户 })), total, page, 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 ae2d138d..a6ece873 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 @@ -1742,8 +1742,8 @@ function RewardTypeSummarySection({ {new Date(entry.createdAt).toLocaleString('zh-CN')} {/* [2026-01-07] 更新:使用 getAccountDisplayName 显示账户名称和编码 */} {getAccountDisplayName(entry.accountSequence)} - {/* [2026-02-05] 新增:显示来源用户账户序列号 */} - {entry.sourceAccountSequence ?? '-'} + {/* [2026-02-05] 新增:显示来源用户账户序列号,从 memo 解析 */} + {entry.sourceAccountSequence ?? entry.memo?.match(/来自用户([^\s的]+)/)?.[1] ?? '-'} {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 be88a73a..a11c4976 100644 --- a/frontend/admin-web/src/types/system-account.types.ts +++ b/frontend/admin-web/src/types/system-account.types.ts @@ -329,6 +329,9 @@ export interface RewardEntryDTO { createdAt: string; claimedAt: string | null; expiredAt: string | null; + // [2026-03-13] 新增:memo 原始备注,用于在 sourceAccountSequence 为空时解析来源用户 + // 格式示例:'市团队权益(441300):来自用户D26031300003的认种' + memo: string | null; } /**