Commit 6a17cc7b authored by yangyw's avatar yangyw

feature: 删除多余日志

parent 401196e7
...@@ -758,7 +758,18 @@ public class AppChatCompletionService { ...@@ -758,7 +758,18 @@ public class AppChatCompletionService {
hots.add(dto); hots.add(dto);
}); });
} }
return PageResult.of(1, 10 , 5, hots); // 获取5个随机系统判断热门问题
PageResult<HotQaMobileDto> pageResult = kbService.hotQaList(request);
if(Objects.nonNull(pageResult) && CollectionUtil.isNotEmpty(pageResult.getItems())) {
List<HotQaMobileDto> items = pageResult.getItems();
if(items.size() > 5){
Collections.shuffle(items);
items = items.subList(0, 5);
}
hots.addAll(items);
}
pageResult.setItems(hots);
return pageResult;
} }
/** /**
......
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