-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat] 보고싶어요 추가/삭제시 플레이리스에 자동 추가/삭제 기능 추가
- Loading branch information
Showing
4 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...ain/java/com/mookive/mookive_backend/heartPlaylist/service/HeartPlaylistQueryService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.mookive.mookive_backend.heartPlaylist.service; | ||
|
||
import com.mookive.mookive_backend.heartPlaylist.domain.HeartPlaylist; | ||
import com.mookive.mookive_backend.heartPlaylist.repository.HeartPlaylistRepository; | ||
import jakarta.transaction.Transactional; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
@RequiredArgsConstructor | ||
@Transactional | ||
public class HeartPlaylistQueryService { | ||
|
||
private final HeartPlaylistRepository heartPlaylistRepository; | ||
|
||
public HeartPlaylist findByUserId(Long userId) { | ||
return heartPlaylistRepository.findByUserId(userId); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
.../mookive/mookive_backend/movieInPlaylist/domain/service/MovieInPlaylistDeleteService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.mookive.mookive_backend.movieInPlaylist.domain.service; | ||
|
||
import com.mookive.mookive_backend.movieInPlaylist.domain.respository.MovieInPlaylistRepository; | ||
import jakarta.transaction.Transactional; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
@RequiredArgsConstructor | ||
@Transactional | ||
public class MovieInPlaylistDeleteService { | ||
|
||
private final MovieInPlaylistRepository movieInPlaylistRepository; | ||
|
||
public void deleteByPlaylistIdAndMovieId(Long playlistId, Long movieId) { | ||
movieInPlaylistRepository.deleteByPlaylistIdAndMovieId(playlistId, movieId); | ||
} | ||
} |