-
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.
Merge pull request #121 from 22caps/dev
병합쓰
- Loading branch information
Showing
6 changed files
with
79 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,15 +7,22 @@ | |
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@Schema(description = "로그인 요청 정보") | ||
@Schema(description = "로그인 응답 정보, 사용자의 정답률 정보를 반환하도록") | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class SignInEmailResponseDto { | ||
|
||
@Schema(description = "회원 Email", example = "[email protected]") | ||
private String email; | ||
// WORD, CONVERSATION, GRAMMAR 정답률 정보 | ||
@Schema(description = "문법 문제 정답률", example = "0.5") | ||
private double grammarCorrectRate; | ||
|
||
public static SignInEmailResponseDto of(String email) { | ||
return new SignInEmailResponseDto(email); | ||
@Schema(description = "회화 문제 정답률", example = "0.5") | ||
private double conversationCorrectRate; | ||
|
||
@Schema(description = "단어 문제 정답률", example = "0.5") | ||
private double wordCorrectRate; | ||
|
||
public static SignInEmailResponseDto of(double grammarCorrectRate, double conversationCorrectRate, double wordCorrectRate) { | ||
return new SignInEmailResponseDto(grammarCorrectRate, conversationCorrectRate, wordCorrectRate); | ||
} | ||
} |
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
12 changes: 12 additions & 0 deletions
12
src/main/java/com/syu/capsbe/domain/solveHistory/PluginSolveHistoryRepository.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,9 +1,21 @@ | ||
package com.syu.capsbe.domain.solveHistory; | ||
|
||
import java.util.List; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface PluginSolveHistoryRepository extends JpaRepository<PluginSolveHistory, Long> { | ||
|
||
|
||
// member_id로 조회 | ||
@Query("SELECT sh FROM PluginSolveHistory sh WHERE sh.member.id = :memberId AND sh.problemType = 'GRAMMAR'") | ||
List<PluginSolveHistory> findGrammarByMemberId(Long memberId); | ||
|
||
@Query("SELECT sh FROM PluginSolveHistory sh WHERE sh.member.id = :memberId AND sh.problemType = 'CONVERSATION'") | ||
List<PluginSolveHistory> findConversationByMemberId(Long memberId); | ||
|
||
@Query("SELECT sh FROM PluginSolveHistory sh WHERE sh.member.id = :memberId AND sh.problemType = 'WORD'") | ||
List<PluginSolveHistory> findWordByMemberId(Long memberId); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,9 @@ public class PluginSolveHistoryDetailRequestDto { | |
@Schema(description = "유저 이메일", example = "[email protected]") | ||
private String email; | ||
|
||
@Schema(description = "문제 타입", example = "GRAMMAR") | ||
private String problemType; | ||
|
||
@Schema(description = "정답 여부", example = "true") | ||
private boolean isCorrect; | ||
} |