Skip to content

Conversation

@hyeonahhh
Copy link
Contributor

작업내용

  • 체크리스트만 조회되는 api 생성

상세설명_ & 캡쳐

image
스웨거 통해서 테스팅한 결과입니다~!

image
image
Finder 사용하는 로직으로 변경했습니다!

@hyeonahhh hyeonahhh added the ✨ feature 기능 추가 label Apr 6, 2025
@hyeonahhh hyeonahhh self-assigned this Apr 6, 2025
@hyeonahhh hyeonahhh added 코난 코난이 작업했습니다. 👊🏻 PULL REQUEST pr날릴때 labels Apr 6, 2025
Copy link
Contributor

@essaysir essaysir left a comment

Choose a reason for hiding this comment

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

고생하셨습니다.!!

.answerType(entity.getQuestionId().getAnswerType())
.build())
.collect(Collectors.toList());
}
Copy link
Contributor

Choose a reason for hiding this comment

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

해당 부분에서 ChecklistAnswerResponseDTO 에서 정적 메서드를 만들어서 dto 로 변환을 로직을 넣으면 코드가 한눈에 보기가 좋아지고, 관심사도 정확히 분리될 거 같아서 더 좋지 않을 까 하는 의견이 있습니다.!

List<ChecklistAnswer> answerList = checklistAnswerRepository.findChecklistAnswerByLimjangId(limjang);
return ChecklistAnswerResponseDTO.fromEntityList(answerList);

Copy link
Contributor

Choose a reason for hiding this comment

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

저두 동의합니다 그리구 자바 16부터 .collect(Collectors.toList()); -> toList() 로 대체 가능한데 저희가 쓰는거 17이라 고려해보시면 조을 것 같아요!!

Copy link
Contributor

Choose a reason for hiding this comment

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

이 객체에서는 repository 같이 엔티티만 리턴하고 서비스나 DTO에서 가공하는건 어떨까요?? Limjang도 서비스에서 NoteFinder(LimjangFinder)에서 찾으면 더 좋을 것 같아요

private final LimjangRepository limjangRepository;

public List<ChecklistAnswerResponseDTO.AnswerDto> findByLimjangId(Long limjangId) {
Limjang limjang = limjangRepository.findById(limjangId)
Copy link
Contributor

Choose a reason for hiding this comment

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

임장찾을 때 deleted 필드가 false인 것으로 찾아주셔야할 것 같습니다!! 현재 softdelete 되는 형태라 삭제된 임장들도 다 찾아질 것 같습니다

.answerType(entity.getQuestionId().getAnswerType())
.build())
.collect(Collectors.toList());
}
Copy link
Contributor

Choose a reason for hiding this comment

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

이 객체에서는 repository 같이 엔티티만 리턴하고 서비스나 DTO에서 가공하는건 어떨까요?? Limjang도 서비스에서 NoteFinder(LimjangFinder)에서 찾으면 더 좋을 것 같아요

@hyeonahhh hyeonahhh merged commit 4670f4c into dev Apr 19, 2025
1 check passed
PicturePark1101 pushed a commit that referenced this pull request Jun 1, 2025
[feat/#317] 마이노트 - 상세 - 체크리스트 조회 API
@essaysir essaysir deleted the feat/#317 branch September 10, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feature 기능 추가 코난 코난이 작업했습니다. 👊🏻 PULL REQUEST pr날릴때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants