From 7c2c6a5e5b3d9f96aef3c67573aa62bbd9a3aa7f Mon Sep 17 00:00:00 2001
From: p-honggang.li <p-honggang.li@pcitc.com>
Date: 星期四, 11 九月 2025 10:48:18 +0800
Subject: [PATCH] 修改产品类型,单位工程条偶见查询问题

---
 src/main/java/com/webmanage/service/CartService.java |   32 +++++++++++++++++++-------------
 1 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/src/main/java/com/webmanage/service/CartService.java b/src/main/java/com/webmanage/service/CartService.java
index 58a08bb..478ab64 100644
--- a/src/main/java/com/webmanage/service/CartService.java
+++ b/src/main/java/com/webmanage/service/CartService.java
@@ -14,60 +14,66 @@
     /**
      * 娣诲姞鍟嗗搧鍒拌喘鐗╄溅锛圧edis + 鏁版嵁搴擄級
      */
-    boolean addToCart(Long userId, Long unitId, CartItemDTO cartItemDTO);
+    boolean addToCart(String userId, String unitId, CartItemDTO cartItemDTO);
     
     /**
      * 浠庤喘鐗╄溅绉婚櫎鍟嗗搧锛圧edis + 鏁版嵁搴擄級
      */
-    boolean removeFromCart(Long userId, Long unitId, Long pricingId);
+    boolean removeFromCart(String userId, String unitId, String productId, Long pricingId);
     
     /**
      * 鏇存柊璐墿杞﹀晢鍝佹暟閲忥紙Redis + 鏁版嵁搴擄級
      */
-    boolean updateCartItemQuantity(Long userId, Long unitId, Long pricingId, Integer quantity);
-    
+    boolean updateCartItemQuantity(String userId, String unitId,String productId, Long pricingId, Integer quantity);
+
+    /**
+     * 鏇存柊璐墿杞﹀晢鍝佸勾闄愶紙Redis + 鏁版嵁搴擄級
+     */
+    boolean updateCartItemDuration(String userId, String unitId,String productId, Long pricingId, Integer duration);
+
+
     /**
      * 娓呯┖璐墿杞︼紙Redis + 鏁版嵁搴擄級
      */
-    boolean clearCart(Long userId, Long unitId);
+    boolean clearCart(String userId, String unitId,String productId);
     
     /**
      * 鑾峰彇璐墿杞︿俊鎭紙浼樺厛Redis锛屽け璐ュ垯浠庢暟鎹簱鍔犺浇锛�
      */
-    CartVO getCart(Long userId, Long unitId);
+    CartVO getCart(String userId, String unitId, String productId);
     
     /**
      * 鑾峰彇璐墿杞﹀晢鍝佸垪琛紙浼樺厛Redis锛屽け璐ュ垯浠庢暟鎹簱鍔犺浇锛�
      */
-    List<CartItemVO> getCartItems(Long userId, Long unitId);
+    List<CartItemVO> getCartItems(String userId, String unitId,String productId);
     
     /**
      * 妫�鏌ヨ喘鐗╄溅鍟嗗搧搴撳瓨
      */
-    boolean checkCartItemStock(Long userId, Long unitId, Long pricingId);
+    boolean checkCartItemStock(String userId, String unitId, Long pricingId);
     
     /**
      * 鎵归噺鍒犻櫎璐墿杞﹀晢鍝侊紙Redis + 鏁版嵁搴擄級
      */
-    boolean batchRemoveFromCart(Long userId, Long unitId, List<Long> pricingIds);
+    boolean batchRemoveFromCart(String userId, String unitId, String productId,List<Long> pricingIds);
     
     /**
      * 鑾峰彇璐墿杞﹀晢鍝佹暟閲忥紙浼樺厛Redis锛屽け璐ュ垯浠庢暟鎹簱鍔犺浇锛�
      */
-    Integer getCartItemCount(Long userId, Long unitId);
+    Integer getCartItemCount(String userId, String unitId, String productId);
     
     /**
      * 浠庢暟鎹簱鍔犺浇璐墿杞︽暟鎹埌Redis
      */
-    boolean loadCartFromDatabase(Long userId, Long unitId);
+    boolean loadCartFromDatabase(String userId, String unitId, String productId);
     
     /**
      * 鍚屾Redis鏁版嵁鍒版暟鎹簱
      */
-    boolean syncCartToDatabase(Long userId, Long unitId);
+    boolean syncCartToDatabase(String userId, String unitId, String productId);
     
     /**
      * 妫�鏌ヨ喘鐗╄溅鏁版嵁涓�鑷存��
      */
-    boolean checkCartConsistency(Long userId, Long unitId);
+    boolean checkCartConsistency(String userId, String unitId, String productId);
 }

--
Gitblit v1.8.0