-
Notifications
You must be signed in to change notification settings - Fork 4
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
[BE] 제출한 인원 조회하는 기능 구현하기 #579
[BE] 제출한 인원 조회하는 기능 구현하기 #579
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
잘 구현 해주셨군요!
approve 각 이었지만 ExceptionMapper 등록이 안된 것 같아 Rc드립니다
import org.springframework.web.bind.annotation.RequestParam; | ||
|
||
@RequiredArgsConstructor | ||
@Controller |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RestController이어야 할 것 같지만 어차피 머지할때 해결할 것 같습니다
|
||
import harustudy.backend.common.exception.HaruStudyException; | ||
|
||
public class CurrentCycleContentNotExistsException extends HaruStudyException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ExceptionMapper 추가 됐나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이건 클라까지 안 나가는 예외라 괜찮지 않을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#580 으로 이슈 파뒀습니다!
|
||
import harustudy.backend.common.exception.HaruStudyException; | ||
|
||
public class SubmitNotAllowedStepException extends HaruStudyException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ExceptionMapper 추가 됐나요?
Study study = studyRepository.findByIdIfExists(studyId); | ||
List<Participant> participants = participantRepository.findByStudy(study); | ||
return generateSubmitterResponses(study, participants); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제가 구현한것도 마찬가지로 일단 구현 해놓고 최적화를 고려해야겠네요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
나중에 fetch join 하죠
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
최적화할게 많겠네요
.filter(each -> each.step.equals(step)) | ||
.map(each -> each.strategy) | ||
.findFirst() | ||
.orElseThrow(SubmitNotAllowedStepException::new) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 예외의 의미는 무엇인가요?
각 step마다 strategy가 없으면 발생하는 것 같은데, 예외의 이름이랑 의미가 모호한 것 같습니다
Study study = studyRepository.findByIdIfExists(studyId); | ||
List<Participant> participants = participantRepository.findByStudy(study); | ||
return generateSubmitterResponses(study, participants); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
나중에 fetch join 하죠
|
||
import harustudy.backend.common.exception.HaruStudyException; | ||
|
||
public class CurrentCycleContentNotExistsException extends HaruStudyException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이건 클라까지 안 나가는 예외라 괜찮지 않을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
딱히 변경점이라고 할만한 부분은 안보여서 approve 했습니당
import java.util.List; | ||
|
||
@RequiredArgsConstructor | ||
@Service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge할 때 트랜잭션 설정 추가해줘야겠네용
Study study = studyRepository.findByIdIfExists(studyId); | ||
List<Participant> participants = participantRepository.findByStudy(study); | ||
return generateSubmitterResponses(study, participants); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
최적화할게 많겠네요
…tters # Conflicts: # backend/src/main/java/harustudy/backend/common/exception/ExceptionMapper.java # backend/src/main/java/harustudy/backend/view/controller/PollingController.java # backend/src/main/java/harustudy/backend/view/service/PollingService.java # backend/src/test/java/harustudy/backend/view/service/PollingServiceTest.java
* feat: Polling 관련 패키지 구성 * [BE] 기존 api 중 폴링으로 인한 변경 반영, studyId로 참여코드 조회 api 구현 (#569) * feat: progress 삭제 및 study 정보 변경 관련 api 수정 * feat: studyId로 참여 코드 조회 api 구현 * fix: CachingFilter를 /api/participantCodes 에 적용 * feat: 스터디 아이디로 참여 코드 조회 시나리오 테스트 추가 * fix: 참여 코드 관련 필터 로직 수정 * refactor: 스터디 생성 시 Location 헤더로만 응답을 반환하도록 변경 * [BE] 대기방 페이지 폴링 기능 구현하기 (#575) * feat: 대기방 폴링 api 구현 * refactor: 스터디 참여 로직 수정 * test: 참여 관련 테스트 추가 * refactor: 생성자 체이닝 사용 * refactor: import 와일드카드 제거 * refactor: 메서드 네이밍 변경 * test: 메서드 네이밍 참여를 참여자 정보로 수정 * test: 메서드 네이밍 폴링 키워드 제거 * refactor: dto 변환 로직 dto로 이동 * refactor: 개행 제거 * refactor: 정적 팩터리 메서드 도입 및 생성자 제거로 인한 테스트 수정사항 반영 * test: expected를 given으로 이동 * refactor: 정적 팩터리 메서드 네이밍 수정 * test: expected를 given으로 이동 * [BE] 이미 시작한 스터디 신규 참여 차단 로직 구현 (#578) * feat: 이미 시작한 스터디 참여 시 에러 반환 로직 구현 * refactor: assertThrows -> assertThatThrownBy 다른 테스트와 동일한 방식으로 변경 * [BE] 진행 페이지 폴링 기능 구현하기 (#577) * feat: polling API 구현을 위한 view 패키지 및 기본 컨트롤러, 서비스 클래스 생성 * feat: PollingController 구현 * feat: 폴링 서비스 로직 및 테스트 구현 * feat: 스터디 상태 값만 조회하도록 구현 * feat: controller 단에 authMember 추가 * feat: 기타 수정 사항 반영 * feat: 스터디에서 step 조회 시 Enum으로 조회하도록 수정 * feat: StudyRepository 메서드 네이밍 수정 * style: 잘못된 개행 수정 * fix: resolve merge conflict --------- Co-authored-by: aak2075 <[email protected]> * [BE] 제출한 인원 조회하는 기능 구현하기 (#579) * feat: 제출 인원 조회 기능 및 테스트 구현 * test: 스터디 종료 상태 테스트 케이스 추가 * refactor: DTO에서 정적 팩토리 메소드를 사용하도록 변경 * refactor: Controller -> RestController로 변경 * chore: ExceptionMapper Exception 추가 * chore: 클래스명 수정 * fix: resolve merge conflict --------- Co-authored-by: aak2075 <[email protected]> --------- Co-authored-by: Gyuseong Lee <[email protected]> Co-authored-by: hiiro <[email protected]> Co-authored-by: teo <[email protected]>
관련 이슈
구현 기능 및 변경 사항
Content
에 boolean으로 검사하는 로직이 추가되었습니다.hasEmptyPlan
메소드는 역할이 겹쳐서 제거했습니다.스크린샷(선택)