...
|
...
|
@@ -24,6 +24,7 @@ import com.yohobuy.platform.model.common.PageResponseVO; |
|
|
import com.yohobuy.platform.model.grass.request.GrassArticleReq;
|
|
|
import com.yohobuy.platform.model.grass.response.ArticleDetailRspBo;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.commons.lang3.StringEscapeUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
...
|
...
|
@@ -484,10 +485,10 @@ public class GrassArticleServiceImpl implements IGrassArticleService{ |
|
|
// rspBo.setTopicName(getArticleName(article.getTopicId()));
|
|
|
if(article.getAuthorType() ==2){
|
|
|
Author author = authorInfoMap.get(article.getAuthorUid());
|
|
|
rspBo.setNickName(author == null ? "" : author.getUsername());
|
|
|
rspBo.setNickName(StringEscapeUtils.escapeHtml4(author == null ? "" : author.getUsername()));
|
|
|
}else {
|
|
|
UserInfoRspBO userinfo = userInfoMap.get(article.getAuthorUid());
|
|
|
rspBo.setNickName(userinfo == null ? "" : userinfo.getNickName());
|
|
|
rspBo.setNickName(StringEscapeUtils.escapeHtml4(userinfo == null ? "" : userinfo.getNickName()));
|
|
|
}
|
|
|
rspBo.setCommentCount(Optional.ofNullable(commentCount.get(article.getId())).orElse(0));
|
|
|
rspBo.setFavorCount(article.getFavoriteCount());
|
...
|
...
|
|