From d849ca7bc241f56231c5540c9e5f3125bf6cead8 Mon Sep 17 00:00:00 2001 From: hailin Date: Sun, 1 Mar 2026 09:07:31 -0800 Subject: [PATCH] =?UTF-8?q?fix(wallet):=20getPendingRewards=20=E5=8F=AA?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=20PENDING=20=E7=8A=B6=E6=80=81=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 之前 getPendingRewards 没有传 status 过滤参数,返回了所有状态 (包括 SETTLED 和 EXPIRED)的记录,导致前端误将已结算的预种条目 显示在待领取列表中。 Co-Authored-By: Claude Opus 4.6 --- .../src/application/services/wallet-application.service.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/services/wallet-service/src/application/services/wallet-application.service.ts b/backend/services/wallet-service/src/application/services/wallet-application.service.ts index 64f3c26e..72769f52 100644 --- a/backend/services/wallet-service/src/application/services/wallet-application.service.ts +++ b/backend/services/wallet-service/src/application/services/wallet-application.service.ts @@ -2292,7 +2292,11 @@ export class WalletApplicationService { status: string; createdAt: string; }>> { - const rewards = await this.pendingRewardRepo.findByAccountSequence(accountSequence); + // [2026-03-01] 修复:只返回 PENDING 状态的记录,排除已结算和已过期的 + const rewards = await this.pendingRewardRepo.findByAccountSequence( + accountSequence, + PendingRewardStatus.PENDING, + ); return rewards.map(r => ({ id: r.id.toString(), usdtAmount: r.usdtAmount.value,