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

content长度bug fix

parent b185ad49
...@@ -124,8 +124,13 @@ public class ThemeManager { ...@@ -124,8 +124,13 @@ public class ThemeManager {
themeEntity.setAuthorId(userId); themeEntity.setAuthorId(userId);
themeEntity.setContent(JsonUtil.toJson(req.getContent())); themeEntity.setContent(JsonUtil.toJson(req.getContent()));
//讨论类型,将讨论中的文本放入到discussContent中 //讨论类型,将讨论中的文本放入到discussContent中
if (ThemeTypeEnum.DISCUSSION.getCode().equals(themeEntity.getThemeType())) if (ThemeTypeEnum.DISCUSSION.getCode().equals(themeEntity.getThemeType())) {
themeEntity.setDiscussContent(req.getContent().get(0).getValue()); String content = req.getContent().get(0).getValue();
if (content.length()>256){
content= content.substring(0,255);
}
themeEntity.setDiscussContent(content);
}
//腾讯云敏感词校验 //腾讯云敏感词校验
checkContent(themeEntity.getContent()); checkContent(themeEntity.getContent());
......
...@@ -138,25 +138,7 @@ public class RankService { ...@@ -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 * @param topicId 话题Id
* @return * @return
......
...@@ -111,7 +111,7 @@ public class VisitSummaryService { ...@@ -111,7 +111,7 @@ public class VisitSummaryService {
} }
} }
//统计主题集合的浏览量 //统计行为集合的浏览量
public Map<String, Integer> getCountMapByTargetIds(List<String> refIds, VisitTypeEnum type) { public Map<String, Integer> getCountMapByTargetIds(List<String> refIds, VisitTypeEnum type) {
if (CollectionUtils.isEmpty(refIds)){ if (CollectionUtils.isEmpty(refIds)){
return new HashMap<>(); 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