-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from miinyeong/main
퀴즈 생성 가능 여부API 생성, 퀴즈 답변 API 생성
- Loading branch information
Showing
4 changed files
with
76 additions
and
6 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
11 changes: 11 additions & 0 deletions
11
src/main/java/com/onestep/server/repository/IQuizRepository.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,8 +1,19 @@ | ||
package com.onestep.server.repository; | ||
|
||
import com.onestep.server.entity.Family; | ||
import com.onestep.server.entity.Letter; | ||
import com.onestep.server.entity.Quiz; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.query.Param; | ||
|
||
import java.util.Date; | ||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
public interface IQuizRepository extends JpaRepository<Quiz, Long> { | ||
|
||
// 날짜로 퀴즈 등록 여부 찾기 | ||
@Query("SELECT q FROM Quiz q WHERE q.user.family.fam_id =:family_id and q.write_date =:date") | ||
Optional<Quiz> findQuizByWriteDate(@Param("family_id") String family_id,@Param("date") Date date); | ||
} |
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