From 57fc57db1eb9f1028468f711b32ed26e5e4ab7e0 Mon Sep 17 00:00:00 2001 From: JOO WON SEO Date: Wed, 22 May 2024 20:10:05 +0900 Subject: [PATCH] =?UTF-8?q?Hotfix=20:=20=EB=8C=93=EA=B8=80=20=EC=88=98=20?= =?UTF-8?q?=EC=A4=91=EB=B3=B5=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?(#162)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :bug: Hotfix: 댓글 수정 request dto 추가 (#149) * Hotfix : 댓글 삭제 시 게시물의 댓글 수 차감 로직 수정 (#151) * :bug: Hotfix: 댓글 수정 request dto 추가 * :bug: Hotfix: 댓글 삭제 시 게시물의 댓글 수 차감 로직 수정 * Feat: 프로필 이모지 설정 로직 구현 (#153) * :card_file_box: profile 속성의 Enum value ProfileEmoji 생성 * :card_file_box: profile 속성 ProfileEmoji 설정 * :sparkles: Feat: 회원 가입 및 정보 수정에 프로필 이모지 설정 로직 추가 * Refactor : 모델 삭제 시 soft delete 구현 (#155) * :card_file_box: versionStatus 속성의 Enum value VersionStatus 생성 * :card_file_box: versionStatus 속성 추가 * :necktie: 모델 삭제 시 sofe delete 구현 * :necktie: 모델 삭제 시 sofe delete 구현 * Fix: 타 사용자 자소서 조회 시 포인트 사용 로직 수정 (#157) * :card_file_box: coverletter 외래키 추가 * :necktie: 자소서 조회 포인트 사용 시, point 데이터에 coverletter 삽입 로직 추가 * :necktie: 자소서 상세 조회 시 포인트를 사용한 자소서인지 나타내는 변수 추가 * Refactor: 댓글 대댓글 계층 구조 적용 (#158) * :card_file_box: 댓글 계층 구조 나타내는 속성 추가 * :card_file_box: db 변경 사항에 따른 댓글 작성 로직 수정 * :necktie: db 변경 사항에 따른 댓글 목록 조회 로직 수정 * :fire: 필요 없는 메소드 삭제 * :necktie: 비활성/탈퇴 회원 제거 로직 추가 * :bug: 게시물 작성자 프로필 추가 * :bug: 자기소개서 작성자 정보 추가 * :bug: 경험카드 작성자 정보 추가 * :bug: 게시물 작성자 프로필 추가 * :bug: 댓글 증가 중복 오류 수정 --- .../domain/comment/service/CommentCommandService.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/codez4/meetfolio/domain/comment/service/CommentCommandService.java b/src/main/java/com/codez4/meetfolio/domain/comment/service/CommentCommandService.java index 56d5d97..87a8542 100644 --- a/src/main/java/com/codez4/meetfolio/domain/comment/service/CommentCommandService.java +++ b/src/main/java/com/codez4/meetfolio/domain/comment/service/CommentCommandService.java @@ -27,18 +27,17 @@ public class CommentCommandService { public CommentProc write(CommentVO commentVO) { Comment comment = commentRepository.save(createComment(commentVO)); - comment.getBoard().changeComment(true); - + Board board = boardQueryService.findById(commentVO.boardId()); + board.changeComment(true); return CommentResponse.toCommentProc(comment.getId()); } private Comment createComment(CommentVO commentVO) { Member member = commentVO.member(); - Board board = boardQueryService.findById(commentVO.boardId()); - board.changeComment(true); String content = commentVO.content(); Long parentId = commentVO.parentId(); + Board board = boardQueryService.findById(commentVO.boardId()); if (parentId != null) { Comment parentComment = getParentComment(parentId);