fix(order): tighten payment method filter by paid status
All checks were successful
Build and Deploy TenantApi + SkuWorker / build-and-deploy (push) Successful in 1m49s

This commit is contained in:
2026-02-27 10:24:53 +08:00
parent 11a1521b6a
commit b1c51c7712

View File

@@ -106,7 +106,8 @@ public sealed class EfOrderRepository(TakeoutAppDbContext context) : IOrderRepos
context.PaymentRecords.Any(record => context.PaymentRecords.Any(record =>
record.TenantId == tenantId && record.TenantId == tenantId &&
record.OrderId == x.Id && record.OrderId == x.Id &&
record.Method == paymentMethod.Value)); record.Method == paymentMethod.Value &&
(record.Status == PaymentStatus.Paid || record.Status == PaymentStatus.Refunded)));
} }
if (!string.IsNullOrWhiteSpace(keyword)) if (!string.IsNullOrWhiteSpace(keyword))