From d16ad81d62b79154ca8f0710a3fe39f2f4edf363 Mon Sep 17 00:00:00 2001 From: hailin Date: Wed, 7 Jan 2026 04:52:00 -0800 Subject: [PATCH] =?UTF-8?q?fix(wallet-service):=20=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E8=B4=A6=E6=88=B7=E8=BD=AC=E5=87=BA=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E8=B4=A6memo=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - memo 格式更新为包含完整信息: - 接收方账户ID - 接收方姓名 - 接收方钱包地址(缩略显示) - 操作员姓名/ID - 备注(如有) - payloadJson 新增 toAddress 字段存储完整地址 示例: "转账至 D25010100001 (张三) | 地址: 0x1234...5678 | 操作员: 管理员A | 备注: 奖励发放" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../system-withdrawal-application.service.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/backend/services/wallet-service/src/application/services/system-withdrawal-application.service.ts b/backend/services/wallet-service/src/application/services/system-withdrawal-application.service.ts index bffa1824..0cfdb6f8 100644 --- a/backend/services/wallet-service/src/application/services/system-withdrawal-application.service.ts +++ b/backend/services/wallet-service/src/application/services/system-withdrawal-application.service.ts @@ -179,6 +179,15 @@ export class SystemWithdrawalApplicationService { }); // 6.4 记录系统账户转出流水 + // [2026-01-07] 更新:memo 包含完整的接收方和操作员信息 + const memoDetails = [ + `转账至 ${command.toAccountSequence}`, + toUserInfo.realName ? `(${toUserInfo.realName})` : null, + `地址: ${toUserInfo.walletAddress.slice(0, 10)}...${toUserInfo.walletAddress.slice(-8)}`, + `操作员: ${command.operatorName || command.operatorId}`, + command.memo ? `备注: ${command.memo}` : null, + ].filter(Boolean).join(' | '); + await tx.ledgerEntry.create({ data: { accountSequence: command.fromAccountSequence, @@ -188,11 +197,12 @@ export class SystemWithdrawalApplicationService { assetType: 'USDT', balanceAfter: newBalance, refOrderId: orderNo, - memo: `转账至 ${command.toAccountSequence}${toUserInfo.realName ? ` (${toUserInfo.realName})` : ''}${command.memo ? ` - ${command.memo}` : ''}`, + memo: memoDetails, payloadJson: { toAccountSequence: command.toAccountSequence, toUserId: toUserInfo.userId, toUserName: toUserInfo.realName, + toAddress: toUserInfo.walletAddress, operatorId: command.operatorId, operatorName: command.operatorName, },