Authored by liangyi.chen@yoho.cn

Fix bug

... ... @@ -61,8 +61,7 @@ public class GrassArticleCommentListener extends AbstractMqListener<GrassArticle
publicUserComment.setSrcChannel(ServiceConstant.SRCCHANNEL_TYPE.YOHO_GRASS);
//1、public_user_comment.article_id取值:select id from public_article where relate_id =
// #{grass_article_comment.dest_id} and article_type in (1,2,4);
Integer articleId = publicArticleService.findArticleIdByRelateIdInArticleTypes(sourceObject.getDestId(),
ServiceConstant.articleTypes);
Integer articleId = publicArticleService.getPublicArticleIdStage1(sourceObject.getDestId());
publicUserComment.setArticleId(articleId);
//查询当前评论被回复的id,即GrassArticleComment中的parentId对应的评论ID
if(sourceObject.getParentId() != null){
... ...
... ... @@ -79,7 +79,6 @@ public class GrassArticlePraiseListener extends AbstractMqListener<GrassArticleP
@Override
protected Object checkData(GrassArticlePraise sourceObject, String action) {
return publicArticleService.findArticleIdByRelateIdInArticleTypes(sourceObject.getArticleId(),
ServiceConstant.articleTypes);
return publicArticleService.getPublicArticleIdStage1(sourceObject.getArticleId());
}
}
... ...
... ... @@ -71,7 +71,6 @@ public class UserFavoriteArticleListener extends AbstractMqListener<UserFavorite
@Override
protected Object checkData(UserFavoriteArticle sourceObject, String action) {
return publicArticleService.findArticleIdByRelateIdInArticleTypes(sourceObject.getArticleId(),
ServiceConstant.articleTypes);
return publicArticleService.getPublicArticleIdStage1(sourceObject.getArticleId());
}
}
... ...
... ... @@ -168,8 +168,5 @@ public class PublicArticleService {
return publicArticleRepository.findByArticleId(grassArticle.getId(), ServiceConstant.articleTypes);
}
}
public Integer findArticleIdByRelateIdInArticleTypes(Integer relateId, int[] articleTypes) {
return publicArticleRepository.findArticleIdByRelateIdInArticleTypes(relateId, articleTypes);
}
}
... ...