Commit 13ac331e authored by 张辰's avatar 张辰
parents 66a77c5d c201a1c3
......@@ -124,8 +124,13 @@ public class ThemeManager {
themeEntity.setAuthorId(userId);
themeEntity.setContent(JsonUtil.toJson(req.getContent()));
//讨论类型,将讨论中的文本放入到discussContent中
if (ThemeTypeEnum.DISCUSSION.getCode().equals(themeEntity.getThemeType()))
themeEntity.setDiscussContent(req.getContent().get(0).getValue());
if (ThemeTypeEnum.DISCUSSION.getCode().equals(themeEntity.getThemeType())) {
String content = req.getContent().get(0).getValue();
if (content.length()>256){
content= content.substring(0,255);
}
themeEntity.setDiscussContent(content);
}
//腾讯云敏感词校验
checkContent(themeEntity.getContent());
......
......@@ -138,25 +138,7 @@ public class RankService {
}
/**
* 最新和热门主题集合
*
* @param hotCount
* @param newCount
* @return
*/
// public List<String> getHotAndNewThemes(Integer hotCount, Integer newCount, String userId) {
// Set<String> hotThemeIds = this.hotestThemes.stream().limit(hotCount)
// .filter(o -> !userId.equals(o.getAuthorId()))
// .map(ThemeAnalysDO::getThemeId)
// .collect(Collectors.toSet());
// Set<String> newThemeIds = themeService.selectExcludeUser(null, null, newCount)
// .stream().map(ThemeEntity::getThemeId).collect(Collectors.toSet());
// hotThemeIds.addAll(newThemeIds);
// return new ArrayList<>(hotThemeIds);
// }
/**
* 话题详情
* 从排序列表中返回话题详情
*
* @param topicId 话题Id
* @return
......
......@@ -111,7 +111,7 @@ public class VisitSummaryService {
}
}
//统计主题集合的浏览量
//统计行为集合的浏览量
public Map<String, Integer> getCountMapByTargetIds(List<String> refIds, VisitTypeEnum type) {
if (CollectionUtils.isEmpty(refIds)){
return new HashMap<>();
......
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