Commit 65020671 authored by 刘基明's avatar 刘基明

主题接口修改

parent 17afcce7
......@@ -230,6 +230,11 @@ public class ThemeManager {
//附件列表
String themeId = themeQO.getThemeId();
List<ThemeContentQo> content = themeQO.getContent();
if (content!=null && content.size()>2){
themeQO.setContent(content.subList(0,2));
}
content = themeQO.getContent();
for (ThemeContentQo themeContentQo : content) {
transferAttachment(themeContentQo,userId);
}
......
......@@ -77,11 +77,9 @@ public class TopicManager {
TopicDetailQo topicDetailQo = new TopicDetailQo();
BeanUtils.copyProperties(topicEntity,topicDetailQo);
List<String> themeIds = themeService.queryThemeIdsByTopic(topicId);
Integer likeCountByThemeIds = collectionService.getCountByTypeAndIds(themeIds, CollectionTypeEnum.LIKE_THEME);
Integer bookCountByThemeIds = collectionService.getCountByTypeAndIds(themeIds, CollectionTypeEnum.BOOK_THEME);
//TODO 浏览量
topicDetailQo.setViewCount(0);
topicDetailQo.setViewCount(1000);
//讨论数=发布主题贴数+回复总数
Integer commentCount = commentService.getCommentCountByThemeIds(themeIds);
topicDetailQo.setDisscussCount(themeIds.size()+commentCount);
......@@ -93,6 +91,8 @@ public class TopicManager {
List<TopicEntity> topicEntities = topicService.queryAll();
List<TopicHotQo> topicHotQos = ConvertUtil.topicEntityToHotQos(topicEntities);
//TODO 添加类型:热 新 顶
topicHotQos.get(0).setType(1);
topicHotQos.get(2).setType(2);
return topicHotQos;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment