fix:重置状态

上级 9a7ec10e
...@@ -42,6 +42,7 @@ public class CsdnUserInfoServiceImpl extends ServiceImpl<CsdnUserInfoMapper, Csd ...@@ -42,6 +42,7 @@ public class CsdnUserInfoServiceImpl extends ServiceImpl<CsdnUserInfoMapper, Csd
for (CsdnUserInfo csdnUserInfo : list) { for (CsdnUserInfo csdnUserInfo : list) {
final String userName = csdnUserInfo.getUserName(); final String userName = csdnUserInfo.getUserName();
final Integer commentStatus = csdnUserInfo.getCommentStatus(); final Integer commentStatus = csdnUserInfo.getCommentStatus();
final String articleType = csdnUserInfo.getArticleType();
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);
...@@ -50,7 +51,7 @@ public class CsdnUserInfoServiceImpl extends ServiceImpl<CsdnUserInfoMapper, Csd ...@@ -50,7 +51,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 || CommentStatus.COMMENT_TOO_FAST.getCode().equals(commentStatus)) { if (!collect || CommentStatus.COMMENT_TOO_FAST.getCode().equals(commentStatus) || !StringUtils.equals(articleType, type)) {
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.
先完成此消息的编辑!
想要评论请 注册