Skip to content

Commit

Permalink
refactor: 파일 존재 여부 확인 메서드 파라미터를 notice에서 noticeId로 변경 및 호출 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jj0526 committed Dec 3, 2024
1 parent cea8d11 commit 2855ecc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public interface NoticeMapper {

default boolean checkHasFile(@MappingTarget Notice notice, FileGetService fileGetService) {
// 게시글에 파일이 존재하는지 확인
return fileGetService.checkFileExists(notice);
return fileGetService.checkFileExistsByNotice(notice.id);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public List<File> findAllByReceipt(Long receiptId) {
return fileRepository.findAllByReceiptId(receiptId);
}

public boolean checkFileExists(Notice notice){
return !findAllByNotice(notice.getId()).isEmpty();
public boolean checkFileExistsByNotice(Long noticeId){
return !findAllByNotice(noticeId).isEmpty();
}

public boolean checkFileExistsByPost(Long postId){
Expand Down

0 comments on commit 2855ecc

Please sign in to comment.