fix:重置评论太快

上级 131adffa
...@@ -41,6 +41,7 @@ public class CsdnUserInfoServiceImpl extends ServiceImpl<CsdnUserInfoMapper, Csd ...@@ -41,6 +41,7 @@ public class CsdnUserInfoServiceImpl extends ServiceImpl<CsdnUserInfoMapper, Csd
if (CollectionUtil.isNotEmpty(list)) { if (CollectionUtil.isNotEmpty(list)) {
for (CsdnUserInfo csdnUserInfo : list) { for (CsdnUserInfo csdnUserInfo : list) {
final String userName = csdnUserInfo.getUserName(); final String userName = csdnUserInfo.getUserName();
final Integer commentStatus = csdnUserInfo.getCommentStatus();
final List<BusinessInfoResponse.ArticleData.Article> articles = csdnArticleService.getArticles(userName); final List<BusinessInfoResponse.ArticleData.Article> articles = csdnArticleService.getArticles(userName);
if (CollectionUtil.isNotEmpty(articles)) { if (CollectionUtil.isNotEmpty(articles)) {
final BusinessInfoResponse.ArticleData.Article article = articles.get(0); final BusinessInfoResponse.ArticleData.Article article = articles.get(0);
...@@ -49,7 +50,7 @@ public class CsdnUserInfoServiceImpl extends ServiceImpl<CsdnUserInfoMapper, Csd ...@@ -49,7 +50,7 @@ public class CsdnUserInfoServiceImpl extends ServiceImpl<CsdnUserInfoMapper, Csd
final String urlInfo = article.getUrl(); final String urlInfo = article.getUrl();
String articleId = urlInfo.substring(urlInfo.lastIndexOf("/") + 1); String articleId = urlInfo.substring(urlInfo.lastIndexOf("/") + 1);
final Boolean collect = csdnCollectService.isCollect(articleId, csdnUserInfo); final Boolean collect = csdnCollectService.isCollect(articleId, csdnUserInfo);
if (!collect) { if (!collect || CommentStatus.COMMENT_TOO_FAST.getCode().equals(commentStatus)) {
csdnUserInfo.setLikeStatus(LikeStatus.UN_PROCESSED.getCode()); csdnUserInfo.setLikeStatus(LikeStatus.UN_PROCESSED.getCode());
csdnUserInfo.setCollectStatus(CollectStatus.UN_PROCESSED.getCode()); csdnUserInfo.setCollectStatus(CollectStatus.UN_PROCESSED.getCode());
csdnUserInfo.setCommentStatus(CommentStatus.UN_PROCESSED.getCode()); csdnUserInfo.setCommentStatus(CommentStatus.UN_PROCESSED.getCode());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册