Skip to content

Commit

Permalink
[refactor] 청원상태 로직 자잘한 오타 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
chahyunsoo committed Aug 29, 2024
1 parent f9d3518 commit c4c7f9f
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ public void onAdminCommentPosted(Long postId, String commentType) {
Post post = postRepository.findById(postId)
.orElseThrow(() -> new PostException(POST_NOT_FOUND));

if (commentType.equals("OFFICIAL")) {
if ("접수완료".equals(post.getCategory())) {
handleReceivedStatus(post);
}
if (commentType.equals("OFFICIAL") && post.getCategory().equals("접수완료") ) {
handleReceivedStatus(post);
}
}

Expand Down Expand Up @@ -91,8 +89,6 @@ private void handleInProgressStatus(Post post, Integer likeCountOfPost) {
}
else if (now.isAfter(createdAt.plusDays(30))) {
updatePostCategoryAndOngoingStatus(post.getId(), "종료됨");
} else {
System.out.println("Like count after status change: " + likeCountOfPost);
}
}

Expand Down

0 comments on commit c4c7f9f

Please sign in to comment.