Commit 0c2e35e0 authored by 刘基明's avatar 刘基明

返回参数

parent 41edd7d9
......@@ -186,6 +186,7 @@ public class ThemeManager {
// 查询主题列表:推荐/关注/热门/最新
public ThemeListResp queryThemes(ThemeListReq req, String userId) {
Integer pageStart = (req.page.pageNumber - 1) * req.page.pageSize;
Integer pageSize = req.page.pageSize;
Integer realSize = req.page.pageSize * 2;
List<ThemeEntity> themes = new ArrayList<>();
......@@ -207,7 +208,7 @@ public class ThemeManager {
throw new BizException("TopicId为空");
}
List<String> rankThemeIds = rankService.getRankThemeListByTopic(req.getTopicId()).subList(pageStart, realSize);
List<String> rankThemeIds = rankService.getRankThemeListByTopic(req.getTopicId()).subList(pageStart, pageSize);
themes = themeService.queryByThemeIds(rankThemeIds);
themes = RankUtils.sortThemeEntityByIds(themes, rankThemeIds);
......@@ -216,7 +217,7 @@ public class ThemeManager {
if (StringUtils.isEmpty(req.getTopicId())) {
throw new BizException("TopicId为空");
}
themes = themeService.queryNewestByTopic(req.topicId, req.page.pageNumber, realSize);
themes = themeService.queryNewestByTopic(req.topicId, req.page.pageNumber, pageSize);
}
// filter用户自己的
......
package com.tanpu.community.manager;
import com.alibaba.fastjson.JSON;
import com.tanpu.common.auth.UserHolder;
import com.tanpu.community.api.beans.vo.KafkaDurationUptMsg;
import com.tanpu.community.api.enums.VisitTypeEnum;
import com.tanpu.community.dao.entity.community.VisitSummaryEntity;
import com.tanpu.community.service.VisitSummaryService;
import com.tanpu.community.util.ConvertUtil;
import lombok.extern.slf4j.Slf4j;
import org.elasticsearch.common.recycler.Recycler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Slf4j
@Service
public class VisitSummaryManager {
......@@ -28,9 +23,6 @@ public class VisitSummaryManager {
@Autowired
private VisitSummaryService visitSummaryService;
@Autowired
private UserHolder userHolder;
@KafkaListener(topics = kafakTopic)
public void updateVisitSummary(String message) {
......
......@@ -37,7 +37,7 @@ public class VisitSummaryService {
.stream().map(VisitSummaryEntity::getRefId).distinct().collect(Collectors.toList());
return ListUtils.subtract(refIds, visited);
}
public List<String> queryUseVisited(String userId) {
public List<String> queryUserVisited(String userId) {
List<String> visited = visitSummaryMapper.selectList(new LambdaQueryWrapper<VisitSummaryEntity>()
.eq(VisitSummaryEntity::getVisitorId, userId))
......
This diff is collapsed.
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