Skip to content

Commit

Permalink
Merge pull request #118 from MUIT-UMC/develop
Browse files Browse the repository at this point in the history
[merge] 250215 / 25th deploy
  • Loading branch information
chaechaen authored Feb 15, 2025
2 parents 6b512ce + 7106d38 commit abfa0f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static Post toPost(Member member, PostType postType, LostRequestDTO reque
.content(requestDTO.getContent())
.images(imgList)
.commentCount(0)
.reportCount(0)
.location(requestDTO.getLocation())
.lostItem(requestDTO.getLostItem())
.lostDate(requestDTO.getLostDate())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public static Post toReview(PostType postType, Member member, Musical musical, R
.musical(musical)
.musicalName(musical.getName())
.commentCount(0)
.reportCount(0)
.rating(requestDTO.getRating())
.location(musical.getTheatre().getName())
.build();
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/muit/backend/service/CommentServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ public CommentReplyResponseDTO.DeleteResultDTO deleteComment(String commentType,

if(commentType.equals("COMMENT")){
Comment comment = commentRepository.findById(commentId).orElseThrow(()->new GeneralException(ErrorStatus.COMMENT_NOT_FOUND));
if(comment.getAnonymousIndex()==-2){
throw new GeneralException(ErrorStatus.COMMENT_NOT_FOUND);
}
//작성자와 동일인인지 검사/또는 관리자인지
if(comment.getMember()==member||comment.getMember().getRole()== Role.ADMIN){
if(!comment.getReplyList().isEmpty()){//대댓글 있으면 내용을 삭제된 댓글입니다 로
Expand Down

0 comments on commit abfa0f0

Please sign in to comment.