From 5aa09188fd869891a2b77872835307369de3f7c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E8=8B=B1=E6=9D=B0?= <327782001@qq.com> Date: Sat, 28 Oct 2023 15:08:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=9C=80=E8=BF=91=E7=9A=84=E6=96=87?= =?UTF-8?q?=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../springbootkwan/service/impl/CsdnCommentServiceImpl.java | 3 +-- .../kwan/springbootkwan/service/impl/CsdnLikeServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/kwan/springbootkwan/service/impl/CsdnCommentServiceImpl.java b/src/main/java/com/kwan/springbootkwan/service/impl/CsdnCommentServiceImpl.java index 916e8e7..9346b50 100644 --- a/src/main/java/com/kwan/springbootkwan/service/impl/CsdnCommentServiceImpl.java +++ b/src/main/java/com/kwan/springbootkwan/service/impl/CsdnCommentServiceImpl.java @@ -39,8 +39,7 @@ public class CsdnCommentServiceImpl implements CsdnCommentService { @Override public Boolean isComment(BusinessInfoResponse.ArticleData.Article article, CsdnUserInfo csdnUserInfo) { final Integer commentStatus = csdnUserInfo.getCommentStatus(); - if (CommentStatus.HAVE_ALREADY_COMMENT.getCode().equals(commentStatus) - || CommentStatus.COMMENT_IS_FULL.getCode().equals(commentStatus) + if (CommentStatus.COMMENT_IS_FULL.getCode().equals(commentStatus) || CommentStatus.RESTRICTED_COMMENTS.getCode().equals(commentStatus)) { return true; } diff --git a/src/main/java/com/kwan/springbootkwan/service/impl/CsdnLikeServiceImpl.java b/src/main/java/com/kwan/springbootkwan/service/impl/CsdnLikeServiceImpl.java index 3919520..15c83dd 100644 --- a/src/main/java/com/kwan/springbootkwan/service/impl/CsdnLikeServiceImpl.java +++ b/src/main/java/com/kwan/springbootkwan/service/impl/CsdnLikeServiceImpl.java @@ -26,7 +26,7 @@ public class CsdnLikeServiceImpl implements CsdnLikeService { public Boolean isLike(String articleId, CsdnUserInfo csdnUserInfo) { final String userName = csdnUserInfo.getUserName(); final Integer likeStatus = csdnUserInfo.getLikeStatus(); - if (LikeStatus.HAVE_ALREADY_LIKED.getCode().equals(likeStatus) || LikeStatus.LIKE_IS_FULL.getCode().equals(likeStatus)) { + if (LikeStatus.LIKE_IS_FULL.getCode().equals(likeStatus)) { return true; } String url = "https://blog.csdn.net/" + userName + "/article/details/" + articleId; -- GitLab