|
|
@@ -66,4 +66,13 @@ public class CartService {
|
|
|
result.put("inCart", inCart(collectionId, userId));
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
+ public Map<String, Object> collectionCartStatus() {
|
|
|
+ Long userId = SecurityUtils.getAuthenticatedUser().getId();
|
|
|
+ Long count = cartRepo.countAllByUserIdAndDel(userId, false);
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
+ result.put("count", count);
|
|
|
+// result.put("inCart", inCart(collectionId, userId));
|
|
|
+ return result;
|
|
|
+ }
|
|
|
}
|