-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/#42 발행 관련 api 추가 #43
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
Conversation
sejoon00
left a comment
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.
수고하셨습니다!
| publish.publishedDate, // 발행되지 않은 경우 null 반환 | ||
| GroupBy.list( | ||
| Projections.constructor(ProblemThumbnailResponse.class, | ||
| problem.mainProblemImageUrl |
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.
다지인 변경을 반영안했네요! 바로 반영하겠습니다
| // 발행 시점 다음날부터 발행 가능 | ||
| if (publishedDate.isBefore(LocalDate.now().plusDays(1))) { | ||
| throw new InvalidValueException(ErrorCode.INVALID_DATE_ERROR); | ||
| } |
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.
반영하겠습니다!
| return PublishMonthGetResponse.of( | ||
| publish.getPublishedDate().getDayOfMonth(), | ||
| problemSetResponse | ||
| ); |
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.
분리하겠습니다!
| // 데이터를 day 기준으로 매핑 | ||
| return publishes.stream() | ||
| .map(publish -> { | ||
| ProblemSet problemSet = problemSetRepository.findByIdElseThrow(publish.getProblemSetId()); |
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.
30개의 조회 쿼리가 나가게 될텐데 한번에 조회해올 수 있을까요?
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.
수정했습니다!
| @Operation( | ||
| summary = "문항세트 검색", | ||
| description = "문항세트 타이틀, 문항세트 내 포함된 개념태그, 문항세트 내 포함된 문항 타이틀로 검색합니다." | ||
| description = "문항세트 타이틀, 문항세트 내 포함된 개념태그, 문항세트 내 포함된 문항 타이틀로 검색합니다. 발행상태는 발행이면 CONFIRMED, 아니면 NOT_CONFIRMED 입니다." |
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.
발행 쪽의 문항세트 검색에는 컨펌안된 애들은 안뜨는 api가 추가로 필요할것 같아요
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.
추가하겠습니다!
sejoon00
left a comment
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.
수고하셨습니다!
🌱 관련 이슈
📌 작업 내용 및 특이사항
발행과 관련된 api들을 구현했습니다.
발행 생성 시 컨펌이 완료된 세트, 존재하는 세트, 삭제되지 않은 세트들만 발행되도록 구현했습니다.
발행 날짜는 발행하는 시점을 기준으로 다음날부터만 가능하도록 했습니다.
발행은 삭제하고, 다시 세트를 등록하는 플로우로 이해하고 수정은 구현하지 않고, 삭제 시 디비에서 바로 삭제되도록 했습니다.
문항세트 컨펌 시 유효하지 않은 문항이 포함되어 있다면, 해당 문항ID들을 에러메시지에 담아 출력해주었습니다.
문항세트 조회 시(개별 조회, 검색) 발행 유무와, 발행되었다면 발행날짜를 포함하여 조회되도록 수정했습니다.