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 {
Map<String, TopicRankQo> topicMap = rankService.getRankTopicList(null).stream().collect(Collectors.toMap(TopicRankQo::getTopicId, o -> o, (a, b) -> a));
topicFollowQos.stream().forEach(o -> {
if (topicMap.containsKey(o.getTopicId())) {
TopicRankQo topicRankQo = topicMap.get(o.getTopicId());
BeanUtils.copyProperties(topicRankQo, o);
o.setHasPermission(true);
}
});
......@@ -184,7 +186,7 @@ public class TopicManager {
public DiscussionAeraQo getForum(TopicDiscussionReq req) {
TopicEntity topicEntity = topicService.queryRelateTopic(req);
// 没有关联话题,或者已下线
if (topicEntity==null) return null;
if (topicEntity == null) return null;
DiscussionAeraQo result = new DiscussionAeraQo();
......@@ -192,9 +194,9 @@ public class TopicManager {
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+");
}
......@@ -204,9 +206,9 @@ public class TopicManager {
List<String> authorIds = new ArrayList<>(themeEntities.stream().map(ThemeEntity::getAuthorId).collect(Collectors.toSet()));
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;
}
......
......@@ -40,7 +40,7 @@
select
<include refid="Base_Column_List"/>
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"
open="(" separator="," close=")">
#{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