Commit bbc61c3b authored by 陈立彬's avatar 陈立彬

热门问题列表增加自定义问题

parent 36335cf4
......@@ -551,7 +551,7 @@ public class AppChatCompletionService {
List<HotQaResponseModel> hotQaList = chatCompletionService.hotQaList(new HotQaRequestModel());
if(CollectionUtil.isNotEmpty(hotQaList)) {
Collections.shuffle(hotQaList);
if(hotQaList.size() > 2) {
if(hotQaList.size() > 5) {
hotQaList = hotQaList.subList(0, 5);
}
hotQaList.forEach(v -> {
......@@ -564,7 +564,7 @@ public class AppChatCompletionService {
PageResult<HotQaMobileDto> pageResult = kbService.hotQaList(request);
if(Objects.nonNull(pageResult) && CollectionUtil.isNotEmpty(pageResult.getItems())) {
List<HotQaMobileDto> items = pageResult.getItems();
if(items.size() > 2){
if(items.size() > 5){
Collections.shuffle(items);
items = items.subList(0, 5);
}
......
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