feat(board): 스팸 키워드 자동 블라인드 및 관리자 신고 목록 노출
- BoardService: create/addComment에서 isSpam 감지 시 자동 블라인드 처리, 포인트 미지급 - ReportMapper: listReported 쿼리 확장 — 신고 누적 OR 스팸 감지 블라인드 항목 모두 포함 - ReportedItem: blockReason 필드 추가 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
b3b42f0db6
commit
82eea0b908
@@ -191,7 +191,11 @@ public class BoardService {
|
||||
.build();
|
||||
postMapper.insert(post);
|
||||
applyTags(post.getId(), req.getTagIds());
|
||||
pointService.awardBoardWrite(author.getId(), req.getContent());
|
||||
if (pointService.isSpam(req.getContent())) {
|
||||
postMapper.updateBlocked(post.getId(), true, "스팸 키워드 감지");
|
||||
} else {
|
||||
pointService.awardBoardWrite(author.getId(), req.getContent());
|
||||
}
|
||||
return assemble(mustFindPost(post.getId()), author);
|
||||
}
|
||||
|
||||
@@ -245,7 +249,11 @@ public class BoardService {
|
||||
.content(req.getContent())
|
||||
.build();
|
||||
commentMapper.insert(comment);
|
||||
pointService.awardBoardWrite(author.getId(), req.getContent());
|
||||
if (pointService.isSpam(req.getContent())) {
|
||||
commentMapper.updateBlocked(comment.getId(), true);
|
||||
} else {
|
||||
pointService.awardBoardWrite(author.getId(), req.getContent());
|
||||
}
|
||||
return CommentResponse.from(commentMapper.findById(comment.getId()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user