Skip to content

Conversation

@seokbeom00
Copy link
Contributor

🌱 관련 이슈

📌 작업 내용 및 특이사항

  • 발행과 관련된 api들을 구현했습니다.

  • 발행 생성 시 컨펌이 완료된 세트, 존재하는 세트, 삭제되지 않은 세트들만 발행되도록 구현했습니다.

  • 발행 날짜는 발행하는 시점을 기준으로 다음날부터만 가능하도록 했습니다.

  • 발행은 삭제하고, 다시 세트를 등록하는 플로우로 이해하고 수정은 구현하지 않고, 삭제 시 디비에서 바로 삭제되도록 했습니다.

  • 문항세트 컨펌 시 유효하지 않은 문항이 포함되어 있다면, 해당 문항ID들을 에러메시지에 담아 출력해주었습니다.

  • 문항세트 조회 시(개별 조회, 검색) 발행 유무와, 발행되었다면 발행날짜를 포함하여 조회되도록 수정했습니다.

@seokbeom00 seokbeom00 added Type: Test [이슈 목적] 테스트 코드 추가, 수정 Type: Feature [이슈 목적] 새로운 기능 추가 labels Feb 9, 2025
@seokbeom00 seokbeom00 requested a review from sejoon00 February 9, 2025 16:17
@seokbeom00 seokbeom00 self-assigned this Feb 9, 2025
Copy link
Contributor

@sejoon00 sejoon00 left a 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

문항 타이틀이랑, 문항 메모도 필요하지 않나요?

Copy link
Contributor Author

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);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

비즈니스 로직인 것 같아 도메인으로 옮길 수 있을까요?

Copy link
Contributor Author

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
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

람다안에 너무 복잡하게 들어가서 메서드 추출하는 것은 어떨까요?

Copy link
Contributor Author

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());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

30개의 조회 쿼리가 나가게 될텐데 한번에 조회해올 수 있을까요?

Copy link
Contributor Author

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 입니다."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

발행 쪽의 문항세트 검색에는 컨펌안된 애들은 안뜨는 api가 추가로 필요할것 같아요

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

추가하겠습니다!

Copy link
Contributor

@sejoon00 sejoon00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다!

@sejoon00 sejoon00 merged commit 97049cd into develop Feb 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Feature [이슈 목적] 새로운 기능 추가 Type: Test [이슈 목적] 테스트 코드 추가, 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

발행 관련 api 구현

3 participants