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

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

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