-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
굿굿!!!
There was a problem hiding this 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); |
There was a problem hiding this comment.
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);
}
이런 느낌이 가능한 코드라면 이렇게 하는거 어떤지 의견 드려봅니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 수정해보겠습니닷!!!
|
📢 기능 설명
까먹을까봐 미리 적어요! 다음 회의 때 2차 스프린트 기간에 수정한 api 프론트 변경 여부 물어보고, 수정 전 코드 삭제할게요!!
연결된 issue
연결된 issue를 자동을 닫기 위해 아래 {이슈넘버}를 입력해주세요.
close #279
✅ 체크리스트