From c6f9ea2b20f7ea032b01a434eb7c8ffc3789812e Mon Sep 17 00:00:00 2001 From: LXW <1264174498@qq.com> Date: Mon, 23 Oct 2023 17:35:27 +0800 Subject: [PATCH] (improvement)(chat) show cases order by feedback score (#273) Co-authored-by: jolunoluo --- .../chat/service/impl/ChatServiceImpl.java | 2 +- .../mapper/custom/ShowCaseCustomMapper.xml | 25 +++++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/chat/core/src/main/java/com/tencent/supersonic/chat/service/impl/ChatServiceImpl.java b/chat/core/src/main/java/com/tencent/supersonic/chat/service/impl/ChatServiceImpl.java index 7309437f4..59d1524ef 100644 --- a/chat/core/src/main/java/com/tencent/supersonic/chat/service/impl/ChatServiceImpl.java +++ b/chat/core/src/main/java/com/tencent/supersonic/chat/service/impl/ChatServiceImpl.java @@ -183,7 +183,7 @@ public class ChatServiceImpl implements ChatService { .collect(Collectors.groupingBy(ChatParseDO::getQuestionId)); for (QueryResp queryResp : queryResps) { List chatParseDOList = chatParseMap.get(queryResp.getQuestionId()); - if (CollectionUtils.isEmpty(chatParseMap)) { + if (CollectionUtils.isEmpty(chatParseDOList)) { continue; } List parseInfos = chatParseDOList.stream().map(chatParseDO -> diff --git a/chat/core/src/main/resources/mapper/custom/ShowCaseCustomMapper.xml b/chat/core/src/main/resources/mapper/custom/ShowCaseCustomMapper.xml index e5ea2e18a..416338aa2 100644 --- a/chat/core/src/main/resources/mapper/custom/ShowCaseCustomMapper.xml +++ b/chat/core/src/main/resources/mapper/custom/ShowCaseCustomMapper.xml @@ -56,18 +56,21 @@