From 5480907d4b25fc260cdbe2aceba22cff281bf526 Mon Sep 17 00:00:00 2001 From: Valerii Fedorovych Date: Tue, 2 Jan 2024 12:41:40 +0200 Subject: [PATCH] changed refactored shopping cart service --- .../repository/shopping/cart/ShoppingCartRepository.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/app/bookstore/repository/shopping/cart/ShoppingCartRepository.java b/src/main/java/com/app/bookstore/repository/shopping/cart/ShoppingCartRepository.java index a60a6ed..04325c8 100644 --- a/src/main/java/com/app/bookstore/repository/shopping/cart/ShoppingCartRepository.java +++ b/src/main/java/com/app/bookstore/repository/shopping/cart/ShoppingCartRepository.java @@ -1,12 +1,11 @@ package com.app.bookstore.repository.shopping.cart; import com.app.bookstore.model.ShoppingCart; +import java.util.Optional; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; -import java.util.Optional; - @Repository public interface ShoppingCartRepository extends JpaRepository { @Query("SELECT sc FROM ShoppingCart sc JOIN FETCH sc.cartItems ci WHERE sc.user.id = :userId")