Skip to content
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

Refactor: 프리뷰 사용하는 부분 통합 #311

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

lee-haeseung
Copy link
Member

#️⃣연관된 이슈

📝작업 내용

프리뷰 사용되는 부분 DTO 통합했습니다

해당 과정에서 발행할 수 있는 영속성 컨텍스트 문제 해결해주었습니다.

@lee-haeseung lee-haeseung added the ✨ Feature 기능 개발 label Jan 18, 2025
@lee-haeseung lee-haeseung self-assigned this Jan 18, 2025
@lee-haeseung lee-haeseung linked an issue Jan 18, 2025 that may be closed by this pull request
7 tasks
Copy link
Member

@yumzen yumzen left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 :)

}

@Override
public Optional<Post> findTopByTeamAndPostIdLessThanOrderByCreatedAtDescPostIdDesc(Team findTeam, Long postId) {
Copy link
Member

Choose a reason for hiding this comment

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

boolean isGreaterThan 파라미터를 추가적으로 받아서 postId 대소 비교 결과만 다른 두 쿼리를 하나로 합치는 게 어떨까요??

}

@Override
public Optional<Post> findTopByMemberAndPostIdLessThanOrderByCreatedAtDescPostIdDesc(Member member, Long postId) {
Copy link
Member

Choose a reason for hiding this comment

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

이 쿼리도 마찬가지로 합치면 어떨까요??

@@ -318,4 +314,115 @@ private BooleanBuilder searchBy(String authorName, String teamName, String proje
}
return new BooleanBuilder();
}

@Override
Copy link
Member

Choose a reason for hiding this comment

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

참고로 @OverRide는 사용하지 않아도 됩니다!

@@ -16,17 +16,26 @@ public class PostResponseDTO {
@Builder
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
public record SimplePostResponseDTO(
public record PostPreviewDTO(
Copy link
Member

Choose a reason for hiding this comment

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

DTO 통합하니 훨씬 좋네요 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature 기능 개발
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat: 다이어리 프리뷰 관련 ResponseDTO 통합
2 participants