diff --git a/src/main/java/com/umc/DongnaeFriend/domain/account/sharing/controller/SharingCommentLikeController.java b/src/main/java/com/umc/DongnaeFriend/domain/account/sharing/controller/SharingCommentLikeController.java index 3cd7b64..6ff981c 100644 --- a/src/main/java/com/umc/DongnaeFriend/domain/account/sharing/controller/SharingCommentLikeController.java +++ b/src/main/java/com/umc/DongnaeFriend/domain/account/sharing/controller/SharingCommentLikeController.java @@ -7,7 +7,7 @@ @RequiredArgsConstructor @RestController -@RequestMapping("/account-books/sharing/likes") +@RequestMapping("/account-books/sharing/comments/likes") public class SharingCommentLikeController { private final SharingCommentLikeService sharingCommentLikeService; diff --git a/src/main/java/com/umc/DongnaeFriend/domain/account/sharing/repository/SharingSympathyRepository.java b/src/main/java/com/umc/DongnaeFriend/domain/account/sharing/repository/SharingSympathyRepository.java index 28ba5c4..e08eb8c 100644 --- a/src/main/java/com/umc/DongnaeFriend/domain/account/sharing/repository/SharingSympathyRepository.java +++ b/src/main/java/com/umc/DongnaeFriend/domain/account/sharing/repository/SharingSympathyRepository.java @@ -7,9 +7,15 @@ import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; +import java.util.List; + public interface SharingSympathyRepository extends JpaRepository { @Query("SELECT u FROM User u WHERE u.id = :user_id") User findByUserId(@Param("user_id") Long user_id); @Query("SELECT sb FROM SharingBoard sb WHERE sb.id = :sharing_board_id") SharingBoard findBySharingBoardId(@Param("sharing_board_id") Long sharing_board_id); + + int countAllBySharingBoardId(Long sharing_board_id); + int countAllByUserId(Long userId); + List findByUser_Id(long user_id); }