From 0bb25725f7ae63e813ef5e03ef83c3b3171e8b4f Mon Sep 17 00:00:00 2001
From: anasElhaddad <anas.elhaddad@marketingconfort.com>
Date: Fri, 2 May 2025 09:50:29 +0000
Subject: [PATCH] add isExpired condition to cart pagination
---
CHANGELOG.md | 19 +++++++++++++++++++
.../repositories/CartRepository.java | 2 +-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7608074..48c3c1a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,22 @@
+## [1.0.76-RELEASE]
+### Added
+- add isExpired condition to cart pagination
+
+### Changed
+- Changes in existing functionality.
+
+### Deprecated
+- Soon-to-be removed features.
+
+### Removed
+- Features that have been removed.
+
+### Fixed
+- Any bug fixes.
+
+### Security
+- Any security improvements.
+
## [1.0.75-RELEASE]
### Added
- MS-114/Export sale session data to CSV and upload to FTP server
diff --git a/src/main/java/com/marketingconfort/mydressin/repositories/CartRepository.java b/src/main/java/com/marketingconfort/mydressin/repositories/CartRepository.java
index ce6b514..8fb75d8 100644
--- a/src/main/java/com/marketingconfort/mydressin/repositories/CartRepository.java
+++ b/src/main/java/com/marketingconfort/mydressin/repositories/CartRepository.java
@@ -77,7 +77,7 @@ public interface CartRepository extends JpaRepository<Cart, Long>, JpaSpecificat
LocalDateTime endDate,
ItemSource source);
@Query("SELECT c FROM Cart c " +
- "WHERE EXISTS (SELECT ic1 FROM c.items ic1 WHERE ic1.status != 'DELETED_BO' ) " +
+ "WHERE EXISTS (SELECT ic1 FROM c.items ic1 WHERE ic1.status != 'DELETED_BO' AND ic1.isExpired = false ) " +
" AND LOWER(c.status) = 'open' " +
" AND ((-1L) in :clientIds OR c.clientId IN :clientIds) " +
" AND ((-1L) in :productIds OR EXISTS (SELECT ic2 FROM c.items ic2 WHERE ic2.productId IN :productIds))")
--
GitLab