From 3ed13b3ff50dbc800d1e8ef7b2c127b2d9fd56f9 Mon Sep 17 00:00:00 2001 From: JianYu Zheng <2375294554@qq.com> Date: Tue, 8 Jul 2025 17:32:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=BC=8F=E6=B4=9E=20--AgentC?= =?UTF-8?q?hatHistoryServiceImpl.java=20=E7=94=A8=E6=88=B7=E8=81=8A?= =?UTF-8?q?=E5=A4=A9=E8=AE=B0=E5=BD=95=E4=B8=8D=E4=B8=80=E5=AE=9A=E9=83=BD?= =?UTF-8?q?=E5=B8=A6=E6=9C=89=E9=9F=B3=E9=A2=91=EF=BC=8C=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=97=B6=E8=A6=81=E6=8E=92=E9=99=A4=E4=B8=8D=E5=B8=A6=E9=9F=B3?= =?UTF-8?q?=E9=A2=91=E7=9A=84=E6=9C=80=E8=BF=9150=E6=9D=A1=E8=81=8A?= =?UTF-8?q?=E5=A4=A9=E8=AE=B0=E5=BD=95=20--AgentChatHistoryService.java=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B9=E6=B3=95=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/agent/service/AgentChatHistoryService.java | 4 ++-- .../agent/service/impl/AgentChatHistoryServiceImpl.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/main/manager-api/src/main/java/xiaozhi/modules/agent/service/AgentChatHistoryService.java b/main/manager-api/src/main/java/xiaozhi/modules/agent/service/AgentChatHistoryService.java index b69cd7b0..88e7c962 100644 --- a/main/manager-api/src/main/java/xiaozhi/modules/agent/service/AgentChatHistoryService.java +++ b/main/manager-api/src/main/java/xiaozhi/modules/agent/service/AgentChatHistoryService.java @@ -47,9 +47,9 @@ public interface AgentChatHistoryService extends IService getRecentlyFiftyByAgentId(String agentId); diff --git a/main/manager-api/src/main/java/xiaozhi/modules/agent/service/impl/AgentChatHistoryServiceImpl.java b/main/manager-api/src/main/java/xiaozhi/modules/agent/service/impl/AgentChatHistoryServiceImpl.java index 980115ad..47220703 100644 --- a/main/manager-api/src/main/java/xiaozhi/modules/agent/service/impl/AgentChatHistoryServiceImpl.java +++ b/main/manager-api/src/main/java/xiaozhi/modules/agent/service/impl/AgentChatHistoryServiceImpl.java @@ -101,7 +101,8 @@ public class AgentChatHistoryServiceImpl extends ServiceImpl wrapper = new LambdaQueryWrapper<>(); wrapper.select(AgentChatHistoryEntity::getContent,AgentChatHistoryEntity::getAudioId) .eq(AgentChatHistoryEntity::getAgentId, agentId) - .eq(AgentChatHistoryEntity::getChatType, AgentChatHistoryType.USER.getValue()); + .eq(AgentChatHistoryEntity::getChatType, AgentChatHistoryType.USER.getValue()) + .isNotNull(AgentChatHistoryEntity::getAudioId); // 构建分页查询,查询前50页数据 Page pageParam = new Page<>(0, 50);