处理列表图片问题
This commit is contained in:
parent
95136bda9e
commit
e3c00ce7e7
@ -197,9 +197,6 @@ public class NewsContentAppDTO implements Serializable {
|
||||
}
|
||||
|
||||
public List<NewsLabelConfigDTO> getNewsContentLabelList() {
|
||||
if(this.newsContentLabelList == null) {
|
||||
this.newsContentLabelList = new ArrayList<>();
|
||||
}
|
||||
return newsContentLabelList;
|
||||
}
|
||||
|
||||
|
@ -414,19 +414,19 @@ public class NewsContentServiceImpl extends BaseService implements INewsContentS
|
||||
}
|
||||
for (NewsContentAppDTO appDTO : newsContentDTOs) {
|
||||
// 第一步 查找封面图片
|
||||
List<NewsContentCoverDTO> newsContentCoverDTOs = new ArrayList<>();
|
||||
appDTO.setNewsContentCoverList(newsContentCoverDTOs);
|
||||
for (NewsContentCoverDTO newsContentCoverDTO : converList) {
|
||||
if (StringUtils.equals(appDTO.getNewsContentId(), newsContentCoverDTO.getNewsContentId())) {
|
||||
if(appDTO.getNewsContentCoverList().isEmpty()) {
|
||||
appDTO.getNewsContentCoverList().add(newsContentCoverDTO);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
newsContentCoverDTOs.add(newsContentCoverDTO);
|
||||
}
|
||||
}
|
||||
// 第二步 查找配置的标签项
|
||||
List<NewsLabelConfigDTO> newsLabelConfigDTOs = new ArrayList<>();
|
||||
appDTO.setNewsContentLabelList(newsLabelConfigDTOs);
|
||||
for (NewsLabelConfigDTO newsLabelConfigDTO : configList) {
|
||||
if (StringUtils.equals(appDTO.getNewsContentId(), newsLabelConfigDTO.getNewsContentId())) {
|
||||
appDTO.getNewsContentLabelList().add(newsLabelConfigDTO);
|
||||
newsLabelConfigDTOs.add(newsLabelConfigDTO);
|
||||
}
|
||||
}
|
||||
// 第三步 查找评论数
|
||||
|
Loading…
Reference in New Issue
Block a user