Skip to content

Commit

Permalink
refactor/comment notice (#138)
Browse files Browse the repository at this point in the history
* House Save 시 Point 처리

* #16 House Save 시 Point 처리

* #45 update user-fee api

* #54 이달의 관리비 조회

* #72 이달의 관리비 조회(위젯 또는 하단 탭 접근)

* #72 UserFee field nullable 처리

* #72 UserFee API 수정

* #80 이달의 관리비 수정 API

* #80 피드백 반영

* conflict 해결

* #88 update user and mypage api

* #89 MyPage 사용자 게시물 조회 API

* #109 커뮤니티 등록 API 수정

* #116 Get House API

* 137 유저 알림 API 조건부 호출

* #137 유저 알림 API 조건부 호출 피드백 적용
  • Loading branch information
duddn2012 authored Aug 22, 2023
1 parent b331534 commit 826801a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.example.hello_there.exception.BaseException;
import com.example.hello_there.exception.BaseResponse;
import com.example.hello_there.login.jwt.JwtService;
import com.example.hello_there.notice.NoticeService;
import com.example.hello_there.user.UserRepository;
import com.example.hello_there.utils.UtilService;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.example.hello_there.comment.likecomment.LikeComment;
import com.example.hello_there.comment.likecomment.LikeCommentRepository;
import com.example.hello_there.exception.BaseException;
import com.example.hello_there.notice.NoticeService;
import com.example.hello_there.report.Report;
import com.example.hello_there.report.ReportRepository;
import com.example.hello_there.report.ReportService;
Expand Down Expand Up @@ -38,6 +39,7 @@ public class CommentService {
private final ReportService reportService;
private final UtilService utilService;
private final SQSService sqsService;
private final NoticeService noticeService;


/**
Expand Down Expand Up @@ -66,6 +68,9 @@ public PostCommentRes addComment(Long boardId, Long userId, Long parentId,PostCo
comment.addGroupId(groupId + 1L);
Comment savedParentComment = commentRepository.save(comment);
// 부모 댓글 저장
if(board.getUser().getId() != userId) {
noticeService.sendCommentNotification(savedParentComment.getCommentId());
}
return new PostCommentRes(savedParentComment);
} else {
parentComment = commentRepository.findById(parentId)
Expand All @@ -76,6 +81,9 @@ public PostCommentRes addComment(Long boardId, Long userId, Long parentId,PostCo
Comment savedChildComment = commentRepository.save(comment);
System.out.println(savedChildComment);
// 자식 댓글 저장
if(board.getUser().getId() != userId) {
noticeService.sendCommentNotification(savedChildComment.getCommentId());
}
return new PostCommentRes(savedChildComment);
}

Expand Down
7 changes: 7 additions & 0 deletions src/main/java/com/example/hello_there/login/jwt/Secret.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.example.hello_there.login.jwt;

public class Secret {
public static String JWT_SECRET_KEY = "135b8378904571a649516713c9b3bbffc14f3464a3131504aec324cde5327b4d";
public static String USER_INFO_PASSWORD_KEY = "49e1b884c9469230ae83cd13ff41a03edcfba4288ba75be7ad336c6d8e88d249";
public static String ROOM_PASSWORD_KEY = "4ff7e6d380cd64c20d7b3c5d60263f5c3a69e2b8457e496e551a93e5f81923df";
}

0 comments on commit 826801a

Please sign in to comment.