Skip to content

Commit

Permalink
✅ Feat #57 : [가계부 공유] 공감 기능 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Suanna01 committed Jul 31, 2023
1 parent f320157 commit e2ce8d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

@RequiredArgsConstructor
@RestController
@RequestMapping("/account-books/sharing/likes")
@RequestMapping("/account-books/sharing/comments/likes")
public class SharingCommentLikeController {
private final SharingCommentLikeService sharingCommentLikeService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<SharingSympathy, Long> {
@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<SharingSympathy> findByUser_Id(long user_id);
}

0 comments on commit e2ce8d5

Please sign in to comment.