-
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.
Wkzb 398 โจ ๐ ๋ด๊ฐ ์ข์์/์คํฌ๋ฉํ ๋ ์ํผ ์กฐํ, ์ฐจ๋จ ์ ์ ๋ชฉ๋ก ์กฐํ API ์๋ฌ ์์ (#171)
* ๐ ๋ด๊ฐ ์ฐจ๋จํ ์ ์ ์กฐํ ์ฟผ๋ฆฌ๋ฌธ ์์ * โจ ๋ด๊ฐ ์ข์์ ๋๋ฅธ ๋ ์ํผ ์กฐํ API * โจ ๋ด๊ฐ ์คํฌ๋ฉํ ๋ ์ํผ ์กฐํ API
- Loading branch information
Showing
7 changed files
with
117 additions
and
4 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
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
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
6 changes: 6 additions & 0 deletions
6
src/main/java/zipdabang/server/repository/recipeRepositories/ScrapRepository.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 |
---|---|---|
@@ -1,13 +1,19 @@ | ||
package zipdabang.server.repository.recipeRepositories; | ||
|
||
import org.springframework.data.domain.Page; | ||
import org.springframework.data.domain.PageRequest; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.query.Param; | ||
import zipdabang.server.domain.member.Member; | ||
import zipdabang.server.domain.recipe.Recipe; | ||
import zipdabang.server.domain.recipe.Scrap; | ||
|
||
import java.util.Optional; | ||
|
||
public interface ScrapRepository extends JpaRepository<Scrap, Long> { | ||
@Query("select s.recipe from Scrap s where s.member = :owner and s.recipe.member not in ( select b.blocked from BlockedMember b where b.owner = :owner ) ") | ||
Page<Recipe> findRecipeByMember(@Param("owner") Member owner, PageRequest pageRequest); | ||
Optional<Scrap> findByRecipeAndMember(Recipe recipe, Member member); | ||
|
||
} |
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
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
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