Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mod] 문제 풀이 기능 로직 변경 #75

Closed
GiHoo opened this issue May 16, 2024 · 0 comments · Fixed by #77
Closed

[Mod] 문제 풀이 기능 로직 변경 #75

GiHoo opened this issue May 16, 2024 · 0 comments · Fixed by #77
Assignees
Labels
feat 기능 개발 refactor 리팩토링링링

Comments

@GiHoo
Copy link
Contributor

GiHoo commented May 16, 2024

어떤 기능인가요?

현재 문제 풀이 로직을 변경한다.

현재
사용자는 문제 조회(개수만큼 조회) 후 해당 문제들을 List 형식으로 받아 클라이언트에서 관리한다.
문제 조회 후 문제 풀이 시작을 통해 SolveHistory를 생성하여 이후에 하나씩 저장하는 형태로 관리한다.

개선
문제 풀이 시작 시 SolveHistoty를 생성하고, 껍데기가 아닌 Problem 정보를 해당 요청 문제 수 만큼 저장한다.
-> 미리 저장하는 것이 아닌, 제출 시에만 저장할 수 있도록 변경

문제 요청의 경우 MemberId, SolveHistoryId, ProblemId를 통해 해당 문제를 조회한다.

문제 제출의 경우 MemberId, SolveHistoryId, ProblemId, problemNumber, lastProblemNumber를 통해 제출하고 채점한다.
문제 제출 시 problemNumber와 lastProblemNumber가 일치하면 풀이를 종료하고 SolveHistory의 isCompleted를 true로 변경한다.

@GiHoo GiHoo added feat 기능 개발 refactor 리팩토링링링 labels May 16, 2024
@GiHoo GiHoo self-assigned this May 16, 2024
GiHoo added a commit that referenced this issue May 19, 2024
@GiHoo GiHoo linked a pull request May 19, 2024 that will close this issue
@GiHoo GiHoo closed this as completed in #77 May 19, 2024
GiHoo added a commit that referenced this issue May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 기능 개발 refactor 리팩토링링링
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant