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

讨论区置顶

parent c15de613
......@@ -45,6 +45,9 @@ public class ThemeQo implements Serializable {
@ApiModelProperty(value = "话题名称")
public String topicTitle;
@ApiModelProperty(value = "话题是否需要权限")
public Integer topicSpecialPermission;
@ApiModelProperty(value = "昵称")
public String nickName;
......
......@@ -105,7 +105,7 @@ public class BatchFeignCallService {
// 图片信息
Map<String, FileRecordEntity> imgMap = Maps.newHashMap();
// 话题标题
Map<String, String> topicMap = Maps.newHashMap();
Map<String, TopicEntity> topicMap = Maps.newHashMap();
// 图片信息
Map<String, UserInfoResp> userMap = Maps.newHashMap();
// 批量查询资源信息,将不同类型的id抽取,并通过ids查询并存放到id-对象Map中
......@@ -131,7 +131,7 @@ public class BatchFeignCallService {
Map<String, ZhiboListResp> zhiboMap,
Map<String, FundInfoBaseResp> fundMap,
Map<String, OfflineActivitySimpleResp> activityMap, Map<String, FileRecordEntity> imgMap,
Map<String, String> topicMap,
Map<String, TopicEntity> topicMap,
Map<String, UserInfoResp> userMap,
List<ThemeQo> themeQos
) {
......@@ -249,7 +249,7 @@ public class BatchFeignCallService {
topicService.queryByIds(setToList(topicIds));
if (!CollectionUtils.isEmpty(topicEntities)) {
topicMap.putAll(topicEntities.stream().collect(Collectors
.toMap(TopicEntity::getTopicId, TopicEntity::getTopicTitle)));
.toMap(TopicEntity::getTopicId, o->o)));
}
}
if (!CollectionUtils.isEmpty(userIds)) {
......@@ -376,11 +376,13 @@ public class BatchFeignCallService {
Map<String, FundInfoBaseResp> fundMap,
Map<String, OfflineActivitySimpleResp> activityMap, Map<String, FileRecordEntity> imgUrlMap,
Map<String, UserInfoResp> userMap,
Map<String, String> topicMap) {
Map<String, TopicEntity> topicMap) {
for (ThemeQo themeQo : themeQos) {
if (!StringUtils.isEmpty(themeQo.getTopicId()) && topicMap.containsKey(themeQo.getTopicId())) {
//话题标题
themeQo.setTopicTitle(topicMap.get(themeQo.getTopicId()));
TopicEntity topicEntity = topicMap.get(themeQo.getTopicId());
themeQo.setTopicTitle(topicEntity.getTopicTitle());
themeQo.setTopicSpecialPermission(topicEntity.getSpecialPermission());
}
if (!StringUtils.isEmpty(themeQo.getAuthorId()) && userMap.containsKey(themeQo.getAuthorId())) {
//用户信息
......
......@@ -78,7 +78,8 @@
and topic_id="") or topic_id in
<foreach item="item" index="index" collection="topicIdCollection"
open="(" separator="," close=")">
#{item}) limit #{pageStart}, #{pageSize}
#{item}
</foreach>
) limit #{pageStart}, #{pageSize}
</select>
</mapper>
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