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

Fix/#279 3차 스프린트 기간 지도편지 수정 #280

Merged
merged 5 commits into from
Jan 31, 2025

Conversation

kahyun0255
Copy link
Collaborator

@kahyun0255 kahyun0255 commented Jan 28, 2025

📢 기능 설명

  1. /map/archived : 편지 보관 취소(삭제) - request 'letterIds’로 변경
  2. /map/{letterId} : 편지 상세 조회 - 타겟 편지가 맞는지 boolean
  3. 마이페이지 편지 조회에서 받은 타겟 편지 전체 조회 파라미터를 received-map으로 변경

까먹을까봐 미리 적어요! 다음 회의 때 2차 스프린트 기간에 수정한 api 프론트 변경 여부 물어보고, 수정 전 코드 삭제할게요!!

연결된 issue

연결된 issue를 자동을 닫기 위해 아래 {이슈넘버}를 입력해주세요.

close #279

✅ 체크리스트

  • PR 제목 규칙 잘 지켰는가?
  • 추가/수정사항을 설명하였는가?
  • 이슈넘버를 적었는가?

Sorry, something went wrong.

@kahyun0255 kahyun0255 added the fix label Jan 28, 2025
@kahyun0255 kahyun0255 self-assigned this Jan 28, 2025
@kahyun0255 kahyun0255 linked an issue Jan 28, 2025 that may be closed by this pull request
2 tasks
Copy link
Collaborator

@yeonsu00 yeonsu00 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
Collaborator

@l2yujw l2yujw left a comment

Choose a reason for hiding this comment

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

고생하셨어요~!

@@ -258,6 +259,15 @@ public Page<FindAllArchiveLetters> findArchiveLetters(int page, int size, Long u

@Transactional
public void deleteArchivedLetter(DeleteArchivedLettersRequestDTO deleteArchivedLettersRequestDTO, Long userId) {
for (Long archiveId : deleteArchivedLettersRequestDTO.letterIds()) {
MapLetterArchive findArchiveInfo = mapLetterArchiveRepository.findById(archiveId);
Copy link
Collaborator

Choose a reason for hiding this comment

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

계속
findById로 db에 접근하는것 보다 findAllById로 해서 한번에 받아온 뒤에 로컬에서 처리하는 방식으로 하는건 어떨까요?

List<MapLetterArchive> archiveInfos = mapLetterArchiveRepository.findAllById(deleter~~.letterIds());

for(archiveInfo : archiveInfos) {
    archiveInfo.validDeleteArchivedLetter(userId);
    mapLetterArchiveRepository.deleteById(archiveInfo.id);
}

이런 느낌이 가능한 코드라면 이렇게 하는거 어떤지 의견 드려봅니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

넵 수정해보겠습니닷!!!

@kahyun0255 kahyun0255 merged commit 35b6e1e into develop Jan 31, 2025
3 checks passed
@kahyun0255 kahyun0255 mentioned this pull request Feb 1, 2025
3 tasks
@l2yujw l2yujw deleted the fix/#279-map-letter-fix-3 branch February 19, 2025 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix: 3차 스프린트 기간 지도 편지 수정
3 participants