Skip to content

Commit

Permalink
Hotfix : 댓글 수 중복 오류 수정 (#162)
Browse files Browse the repository at this point in the history
* 🐛 Hotfix: 댓글 수정 request dto 추가 (#149)

* Hotfix : 댓글 삭제 시 게시물의 댓글 수 차감 로직 수정 (#151)

* 🐛 Hotfix: 댓글 수정 request dto 추가

* 🐛 Hotfix: 댓글 삭제 시 게시물의 댓글 수 차감 로직 수정

* Feat: 프로필 이모지 설정 로직 구현 (#153)

* 🗃️ profile 속성의 Enum value ProfileEmoji 생성

* 🗃️ profile 속성 ProfileEmoji 설정

* ✨ Feat: 회원 가입 및 정보 수정에 프로필 이모지 설정 로직 추가

* Refactor : 모델 삭제 시 soft delete 구현 (#155)

* 🗃️ versionStatus 속성의 Enum value VersionStatus 생성

* 🗃️ versionStatus 속성 추가

* 👔 모델 삭제 시 sofe delete 구현

* 👔 모델 삭제 시 sofe delete 구현

* Fix: 타 사용자 자소서 조회 시 포인트 사용 로직 수정 (#157)

* 🗃️ coverletter 외래키 추가

* 👔 자소서 조회 포인트 사용 시, point 데이터에 coverletter 삽입 로직 추가

* 👔 자소서 상세 조회 시 포인트를 사용한 자소서인지 나타내는 변수 추가

* Refactor: 댓글 대댓글 계층 구조 적용 (#158)

* 🗃️ 댓글 계층 구조 나타내는 속성 추가

* 🗃️ db 변경 사항에 따른 댓글 작성 로직 수정

* 👔 db 변경 사항에 따른 댓글 목록 조회 로직 수정

* 🔥 필요 없는 메소드 삭제

* 👔 비활성/탈퇴 회원 제거 로직 추가

* 🐛 게시물 작성자 프로필 추가

* 🐛 자기소개서 작성자 정보 추가

* 🐛 경험카드 작성자 정보 추가

* 🐛 게시물 작성자 프로필 추가

* 🐛 댓글 증가 중복 오류 수정
  • Loading branch information
joowojr authored May 22, 2024
1 parent ff1bae9 commit 57fc57d
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 57fc57d

Please sign in to comment.