-
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.
* refactor: issue, pr template 수정 * fix: redissonClient를 SpyBean으로 변경 * feat: exam에 isSingleAttempt 추가 * feat: 시험 응시 횟수 제한 수정 기능 * feat: 시험 응시 횟수 제한에 따라 분산락 적용과 미적용 서비스 사용 * fix: RedissonClient spybean으로 할 시 나머지 테스트 실패 * feat: 대시보드에 제출한 시험 탭 생성 * refactor: 헤더 드랍다운 한글로 변경 * refactor: card description line clamp 3 * refactor: date format 변경 * refactor: 시간 포맷 중 초단위는 제거 * feat: 제출한 시험들 목록을 조회하고, 최근에 제출한 순서로 정렬하는 API 구현 * feat: 제출한 시험 요약 목록 조회 구현 * feat: exam submission sidebar response * feat: 내가 제출한 시험 목록 세부 사항 확인 페이지 구현 * refactor: web code format * refactor: server code format * refactor: 제출 확인 페이지 overflow y scroll * fix: 시험 제작자, 시험 응시자가 아니면 답을 볼 수 없다.
- Loading branch information
Showing
61 changed files
with
3,608 additions
and
1,141 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,9 @@ | ||
## 구현 요약 | ||
|
||
이 부분을 제거하고 작업한 내용에 대해서 자유롭게 작성해주세요. | ||
|
||
## 연관 이슈 | ||
## 연관된 이슈 | ||
|
||
이 부분을 제거하고 연관된 이슈를 아래와 같이 명시해 닫아주세요. | ||
|
||
> ex) * close #12 | ||
## 참고 | ||
> ex) \* close #12 | ||
코드 리뷰에 `RCA 룰`을 적용할 시 참고해주세요. | ||
## 작업 내용 | ||
|
||
| 헤더 | 설명 | | ||
|---------------------|--------------------------------| | ||
| R (Request Changes) | 적극적으로 반영을 고려해주세요 | | ||
| C (Comment) | 웬만하면 반영해주세요 | | ||
| A (Approve) | 반영해도 좋고, 넘어가도 좋습니다. 사소한 의견입니다. | | ||
작업 내용을 간략하게 적어주세요. |
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
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
36 changes: 36 additions & 0 deletions
36
server/src/main/java/com/fluffy/exam/domain/dto/SubmittedExamSummaryDto.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,36 @@ | ||
package com.fluffy.exam.domain.dto; | ||
|
||
import com.querydsl.core.annotations.QueryProjection; | ||
import java.time.LocalDateTime; | ||
import lombok.AccessLevel; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class SubmittedExamSummaryDto { | ||
|
||
private Long examId; | ||
private String title; | ||
private String description; | ||
private AuthorDto author; | ||
private Long submissionCount; | ||
private LocalDateTime lastSubmissionDate; | ||
|
||
@QueryProjection | ||
public SubmittedExamSummaryDto( | ||
Long examId, | ||
String title, | ||
String description, | ||
AuthorDto author, | ||
Long submissionCount, | ||
LocalDateTime lastSubmissionDate | ||
) { | ||
this.examId = examId; | ||
this.title = title; | ||
this.description = description; | ||
this.author = author; | ||
this.submissionCount = submissionCount; | ||
this.lastSubmissionDate = lastSubmissionDate; | ||
} | ||
} |
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
29 changes: 29 additions & 0 deletions
29
server/src/main/java/com/fluffy/submission/application/SubmissionLockService.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,29 @@ | ||
package com.fluffy.submission.application; | ||
|
||
import com.fluffy.auth.domain.Member; | ||
import com.fluffy.exam.domain.Exam; | ||
import com.fluffy.global.exception.BadRequestException; | ||
import com.fluffy.global.redis.DistributedLock; | ||
import com.fluffy.submission.application.request.SubmissionAppRequest; | ||
import com.fluffy.submission.domain.Submission; | ||
import com.fluffy.submission.domain.SubmissionRepository; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
@RequiredArgsConstructor | ||
public class SubmissionLockService { | ||
|
||
private final SubmissionRepository submissionRepository; | ||
private final SubmissionMapper submissionMapper; | ||
|
||
@DistributedLock(key = "#lockName") | ||
public void submitWithLock(SubmissionAppRequest request, Exam exam, Member member, String lockName) { | ||
if (submissionRepository.existsByExamIdAndMemberId(exam.getId(), member.getId())) { | ||
throw new BadRequestException("한 번만 제출 가능합니다."); | ||
} | ||
|
||
Submission submission = submissionMapper.toSubmission(exam, member.getId(), request); | ||
submissionRepository.save(submission); | ||
} | ||
} |
Oops, something went wrong.