From b1c51c7712f44f261884978a743b03d2749f7c27 Mon Sep 17 00:00:00 2001 From: MSuMshk <2039814060@qq.com> Date: Fri, 27 Feb 2026 10:24:53 +0800 Subject: [PATCH] fix(order): tighten payment method filter by paid status --- .../App/Repositories/EfOrderRepository.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Infrastructure/TakeoutSaaS.Infrastructure/App/Repositories/EfOrderRepository.cs b/src/Infrastructure/TakeoutSaaS.Infrastructure/App/Repositories/EfOrderRepository.cs index aac5988..57af3df 100644 --- a/src/Infrastructure/TakeoutSaaS.Infrastructure/App/Repositories/EfOrderRepository.cs +++ b/src/Infrastructure/TakeoutSaaS.Infrastructure/App/Repositories/EfOrderRepository.cs @@ -106,7 +106,8 @@ public sealed class EfOrderRepository(TakeoutAppDbContext context) : IOrderRepos context.PaymentRecords.Any(record => record.TenantId == tenantId && record.OrderId == x.Id && - record.Method == paymentMethod.Value)); + record.Method == paymentMethod.Value && + (record.Status == PaymentStatus.Paid || record.Status == PaymentStatus.Refunded))); } if (!string.IsNullOrWhiteSpace(keyword))