Commit 700f13aa authored by 张辰's avatar 张辰

Merge branch 'v2.3.1' of http://47.100.44.39:10001/tp-backend/tanpu-community into v2.3.1

parents 1e6ce129 c484236c
...@@ -100,9 +100,11 @@ public class TopicManager { ...@@ -100,9 +100,11 @@ public class TopicManager {
Map<String, TopicRankQo> topicMap = rankService.getRankTopicList(null).stream().collect(Collectors.toMap(TopicRankQo::getTopicId, o -> o, (a, b) -> a)); Map<String, TopicRankQo> topicMap = rankService.getRankTopicList(null).stream().collect(Collectors.toMap(TopicRankQo::getTopicId, o -> o, (a, b) -> a));
topicFollowQos.stream().forEach(o -> { topicFollowQos.stream().forEach(o -> {
if (topicMap.containsKey(o.getTopicId())) {
TopicRankQo topicRankQo = topicMap.get(o.getTopicId()); TopicRankQo topicRankQo = topicMap.get(o.getTopicId());
BeanUtils.copyProperties(topicRankQo, o); BeanUtils.copyProperties(topicRankQo, o);
o.setHasPermission(true); o.setHasPermission(true);
}
}); });
...@@ -184,7 +186,7 @@ public class TopicManager { ...@@ -184,7 +186,7 @@ public class TopicManager {
public DiscussionAeraQo getForum(TopicDiscussionReq req) { public DiscussionAeraQo getForum(TopicDiscussionReq req) {
TopicEntity topicEntity = topicService.queryRelateTopic(req); TopicEntity topicEntity = topicService.queryRelateTopic(req);
// 没有关联话题,或者已下线 // 没有关联话题,或者已下线
if (topicEntity==null) return null; if (topicEntity == null) return null;
DiscussionAeraQo result = new DiscussionAeraQo(); DiscussionAeraQo result = new DiscussionAeraQo();
...@@ -192,9 +194,9 @@ public class TopicManager { ...@@ -192,9 +194,9 @@ public class TopicManager {
List<TopicRankQo> collect = rankTopicList.stream().filter(o -> o.getTopicId().equals(topicEntity.getTopicId())).collect(Collectors.toList()); List<TopicRankQo> collect = rankTopicList.stream().filter(o -> o.getTopicId().equals(topicEntity.getTopicId())).collect(Collectors.toList());
BeanUtils.copyProperties(collect.get(0),result); BeanUtils.copyProperties(collect.get(0), result);
if (result.getDisscussCount()!=null && result.getDisscussCount()>99){ if (result.getDisscussCount() != null && result.getDisscussCount() > 99) {
result.setFormatDisscussCount("99+"); result.setFormatDisscussCount("99+");
} }
...@@ -204,9 +206,9 @@ public class TopicManager { ...@@ -204,9 +206,9 @@ public class TopicManager {
List<String> authorIds = new ArrayList<>(themeEntities.stream().map(ThemeEntity::getAuthorId).collect(Collectors.toSet())); List<String> authorIds = new ArrayList<>(themeEntities.stream().map(ThemeEntity::getAuthorId).collect(Collectors.toSet()));
List<UserInfoResp> queryUsersListNew = feignService.getUserList(authorIds); List<UserInfoResp> queryUsersListNew = feignService.getUserList(authorIds);
Map<String, UserInfoResp> nameMap = queryUsersListNew.stream().collect(Collectors.toMap(UserInfoResp::getUserId, o->o)); Map<String, UserInfoResp> nameMap = queryUsersListNew.stream().collect(Collectors.toMap(UserInfoResp::getUserId, o -> o));
result.setThemes(ConvertUtil.themeEntity2Discussion(themeEntities,nameMap)); result.setThemes(ConvertUtil.themeEntity2Discussion(themeEntities, nameMap));
return result; return result;
} }
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from topic from topic
where topic_id in where is_conceal = 0 and delete_tag = 0 and topic_id in
<foreach item="item" index="index" collection="topicIdCollection" <foreach item="item" index="index" collection="topicIdCollection"
open="(" separator="," close=")"> open="(" separator="," close=")">
#{item} #{item}
......
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