Skip to content

Conversation

@hknhj
Copy link
Contributor

@hknhj hknhj commented Jul 27, 2025

#️⃣연관된 이슈

#73

📝작업 내용

문서 검색 시 lastOpened 포함하도록 구현

🔎코드 설명(스크린샷(선택))

  • 각 문서마다 제목 및 유저ID를 토대로 최근 문서 9개를 가져오는 메서드 구현
  • 각 타입별로 최근 문서 9개를 가져오도록 함
  • 모든 문서를 하나의 리스트로 합치고, lastOpened를 기준으로 최신 9개를 추출해서 반환하도록 구현

💬고민사항 및 리뷰 요구사항 (Optional)

X

비고 (Optional)

X

hknhj added 2 commits July 28, 2025 00:16
- last opened 테이블에서 최신순으로 9개를 조회하는 쿼리메서드 구현
- last opened 엔티티를 사용하여 각 문서를 조회하고, converter를 사용하여 WorkspaceResponseDTO.DocumentList를 반환하도록 구현
- 각 문서마다 제목 및 유저ID를 토대로 최근 문서 9개를 가져오는 메서드 구현
- 각 타입별로 최근 문서 9개를 가져오도록 구현
- 모든 문서를 하나의 리스트로 합치고, lastOpened를 기준으로 최신 9개를 추출해서 반환하도록 구현
@hknhj hknhj linked an issue Jul 27, 2025 that may be closed by this pull request
1 task
Copy link
Member

@2ghrms 2ghrms left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!!

Copy link
Contributor

Choose a reason for hiding this comment

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

UserDocumentLastOpened에 없다면 검색이 안되는거라서
문서들이 많은 워크스페이스에 초대받은 상황을 가정하면 아무 문서도 검색이 되지 않아서..
기획이랑도 얘기해봐야할것 같네요

Copy link
Contributor Author

Choose a reason for hiding this comment

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

초대를 받으면 워크스페이스에 있는 문서들을 모두 last opened에 insert하는 로직도 필요한 것 같고, 추가적으로 문서를 조회할 때 마다 last opened 테이블을 업데이트 하도록 해야할 것 같습니다!
따라서 aop나 db의 trigger를 사용해야할 것 같습니다

@hknhj hknhj merged commit a3de33e into dev Jul 28, 2025
1 check passed
@hknhj hknhj deleted the feat/#73-document-search-contaning-last-opened branch July 28, 2025 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: 워크스페이스 문서 검색 기능 API 구현

4 participants