Skip to content

Conversation

@Umjiseung
Copy link
Member

개요

게시글/댓글 욕설 필터를 위해 이벤트를 send하는 것과 검증되어 true라면 오는 이벤트를 컨슘하는 것을 만들었습니다.

본문

  • BoardCreateEvent / CommentCreateEvent 생성
  • AiBoardFilterConsumer / AiCommenrFilterConsumer 추가

@Umjiseung Umjiseung requested a review from vumrra April 11, 2025 03:29
@Umjiseung Umjiseung self-assigned this Apr 11, 2025
communityProcessor.boardFilteredTrue(event.boardId)

} catch (e: Exception) {
log.error("Failed to Batch Addition Temp Point, Batch Id = ${event.id}", e)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

에러 메시지 변경 부탁드립니다

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2d4d320
변경하였습니다

communityProcessor.commentFilteredTrue(event.commentId)

} catch (e: Exception) {
log.error("Failed to Batch Addition Temp Point, Batch Id = ${event.id}", e)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도요

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2d4d320
변경하였습니다

Comment on lines 121 to 137
fun boardFilteredTrue(boardId: Long) {
val board = boardRepository.findByIdOrNull(boardId)
?: throw StageException("Board not found, boardId=${boardId}", HttpStatus.NOT_FOUND.value())

board.changeBoardFilter()

boardRepository.save(board)
}

fun commentFilteredTrue(commentId: Long) {
val comment = commentRepository.findByIdOrNull(commentId)
?: throw StageException("Comment not found, commentId=${commentId}", HttpStatus.NOT_FOUND.value())

comment.changeIsFiltered()

commentRepository.save(comment)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

트랜잭셔널 붙혀주세요

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e8ae063
트랜잭셔널 적용하였습니다

Copy link
Contributor

@vumrra vumrra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨어요

@Umjiseung Umjiseung merged commit cb1bf15 into develop Apr 15, 2025
1 check passed
@vumrra vumrra mentioned this pull request Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants