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

feat: 아카이브 불러오기 #56

Merged
merged 6 commits into from
Jan 31, 2024

Conversation

shinyubin989
Copy link
Contributor

관련된 이슈

BAR-113

작업 사항

  • TemplateCategory에 name필드 추가
  • ArchiveTab enum클래스 추가
  • 아카이브 불러오기 api 생성

@shinyubin989 shinyubin989 self-assigned this Jan 29, 2024
@shinyubin989 shinyubin989 added the feature New feature development label Jan 29, 2024
Copy link
Member

@TaeyeonRoyce TaeyeonRoyce left a comment

Choose a reason for hiding this comment

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

복잡한 로직인데 잘 짜주셨네요
고생하셨습니다!👍👍

몇가지 코멘트 남겨두었습니다.
conflict도 해결해주세요!

) {

public static ArchiveUnitResult of(Archive archive) {
if (archive.getTemplate() == null) {
Copy link
Member

Choose a reason for hiding this comment

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

archive에 메서드로 표현해도 좋아보여요

Suggested change
if (archive.getTemplate() == null) {
if (archive.isMemo()) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

오! 감사합니다 적용해놓을게요

this.content = content;
this.template = template;
public Archive(Member member, MemoFolder memoFolder, MemoContent content, Template template) {
this(null, member, memoFolder, content, template);
Copy link
Member

Choose a reason for hiding this comment

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

👍

Comment on lines 30 to 37
return switch (query.tab()) {
case ALL -> archiveRepository.findAllArchives(query.memberId(), query.folderId())
.stream().map(ArchiveUnitResult::of).collect(Collectors.toList());
case MEMO -> archiveRepository.findAllArchivedMemos(query.memberId(), query.folderId())
.stream().map(ArchiveUnitResult::of).collect(Collectors.toList());
case TEMPLATE -> archiveRepository.findAllArchivedTemplates(query.memberId(), query.folderId())
.stream().map(ArchiveUnitResult::of).collect(Collectors.toList());
};
Copy link
Member

Choose a reason for hiding this comment

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

동적쿼리보다 이게 더 좋아보이네요👍👍


@GetMapping
public ResponseEntity<List<ArchiveUnitResult>> getArchive(AuthMember member,
@RequestBody GetArchiveRequest request) {
Copy link
Member

Choose a reason for hiding this comment

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

GET 요청에는 queryParam으로 담는게 나을 것 같아요
@ModelAttribute로 선언해도 괜찮겠네요

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tabName(전체, 끄적이는, 참고하는) 말씀하신게 맞을까요?? 그렇다면 pathvariable은 어떨까요?

Copy link
Member

Choose a reason for hiding this comment

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

네네 GetArchiveRequestfolderIdtabName 이 있는데 body말고 다른 걸로 표현되면 됩니다!

/archives/folder/{folderId}?tabName={}
이런식은 어떤가요?

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
Member

@TaeyeonRoyce TaeyeonRoyce left a comment

Choose a reason for hiding this comment

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

리뷰 반영 하신 거 확인했습니다!
테스트도 꼼꼼하고 좋네요. 최신순 정렬 반영까지👍👍

머지 하시죠! 수고하셨습니다~!

@shinyubin989 shinyubin989 merged commit 3aea445 into develop Jan 31, 2024
2 checks passed
@shinyubin989 shinyubin989 deleted the BAR-113-BE-아카이브-불러오기 branch January 31, 2024 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants