-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: 데이터베이스 pool 개수와 timeout 정의 * feat: 댓글 추가 작성 비즈니스 예외 정의 * feat: 댓글 재작성 확인 메서드 쿼리 * feat: 댓글 재작성 예외 비즈니스 로직 추가
- Loading branch information
1 parent
802175c
commit 82e22a5
Showing
5 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
src/main/java/econo/buddybridge/comment/exception/CommentAlreadyWrittenException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package econo.buddybridge.comment.exception; | ||
|
||
import econo.buddybridge.common.exception.BusinessException; | ||
|
||
public class CommentAlreadyWrittenException extends BusinessException { | ||
|
||
public static final BusinessException EXCEPTION = new CommentAlreadyWrittenException(); | ||
|
||
private CommentAlreadyWrittenException() { | ||
super(CommentErrorCode.COMMENT_ALREADY_WRITTEN); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/main/java/econo/buddybridge/comment/repository/CommentRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
package econo.buddybridge.comment.repository; | ||
|
||
import econo.buddybridge.comment.entity.Comment; | ||
import econo.buddybridge.member.entity.Member; | ||
import econo.buddybridge.post.entity.Post; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface CommentRepository extends JpaRepository<Comment, Long>, CommentRepositoryCustom { | ||
|
||
boolean existsByPostAndAuthor(Post post, Member author); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters