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

主题接口修改

parent 17afcce7
...@@ -230,6 +230,11 @@ public class ThemeManager { ...@@ -230,6 +230,11 @@ public class ThemeManager {
//附件列表 //附件列表
String themeId = themeQO.getThemeId(); String themeId = themeQO.getThemeId();
List<ThemeContentQo> content = themeQO.getContent(); List<ThemeContentQo> content = themeQO.getContent();
if (content!=null && content.size()>2){
themeQO.setContent(content.subList(0,2));
}
content = themeQO.getContent();
for (ThemeContentQo themeContentQo : content) { for (ThemeContentQo themeContentQo : content) {
transferAttachment(themeContentQo,userId); transferAttachment(themeContentQo,userId);
} }
......
...@@ -77,11 +77,9 @@ public class TopicManager { ...@@ -77,11 +77,9 @@ public class TopicManager {
TopicDetailQo topicDetailQo = new TopicDetailQo(); TopicDetailQo topicDetailQo = new TopicDetailQo();
BeanUtils.copyProperties(topicEntity,topicDetailQo); BeanUtils.copyProperties(topicEntity,topicDetailQo);
List<String> themeIds = themeService.queryThemeIdsByTopic(topicId); List<String> themeIds = themeService.queryThemeIdsByTopic(topicId);
Integer likeCountByThemeIds = collectionService.getCountByTypeAndIds(themeIds, CollectionTypeEnum.LIKE_THEME);
Integer bookCountByThemeIds = collectionService.getCountByTypeAndIds(themeIds, CollectionTypeEnum.BOOK_THEME);
//TODO 浏览量 //TODO 浏览量
topicDetailQo.setViewCount(0); topicDetailQo.setViewCount(1000);
//讨论数=发布主题贴数+回复总数 //讨论数=发布主题贴数+回复总数
Integer commentCount = commentService.getCommentCountByThemeIds(themeIds); Integer commentCount = commentService.getCommentCountByThemeIds(themeIds);
topicDetailQo.setDisscussCount(themeIds.size()+commentCount); topicDetailQo.setDisscussCount(themeIds.size()+commentCount);
...@@ -93,6 +91,8 @@ public class TopicManager { ...@@ -93,6 +91,8 @@ public class TopicManager {
List<TopicEntity> topicEntities = topicService.queryAll(); List<TopicEntity> topicEntities = topicService.queryAll();
List<TopicHotQo> topicHotQos = ConvertUtil.topicEntityToHotQos(topicEntities); List<TopicHotQo> topicHotQos = ConvertUtil.topicEntityToHotQos(topicEntities);
//TODO 添加类型:热 新 顶 //TODO 添加类型:热 新 顶
topicHotQos.get(0).setType(1);
topicHotQos.get(2).setType(2);
return topicHotQos; 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