From 049713a0ee755633e45005057ddcd929d1a6bc46 Mon Sep 17 00:00:00 2001 From: zhenggl Date: Tue, 12 Sep 2023 15:59:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:chatfile=E6=96=B0=E5=A2=9E=E6=97=B6?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=9A=84=E6=95=B0=E6=8D=AE=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E6=95=B0=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chatFile/service/chatFile/ChatFileCreateEAIService.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/chatFile/service/chatFile/ChatFileCreateEAIService.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/chatFile/service/chatFile/ChatFileCreateEAIService.java index 34f90a9..9f73f10 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/chatFile/service/chatFile/ChatFileCreateEAIService.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/chatFile/service/chatFile/ChatFileCreateEAIService.java @@ -1,8 +1,6 @@ package com.digiwin.athena.app.chatFile.service.chatFile; import com.alibaba.fastjson.TypeReference; -import com.alibaba.nacos.common.utils.CollectionUtils; -import com.alibaba.nacos.common.utils.StringUtils; import com.digiwin.app.container.exceptions.DWBusinessException; import com.digiwin.app.service.DWEAIResult; import com.digiwin.athena.app.chatFile.infra.entity.ChatFileEntity; @@ -37,7 +35,8 @@ public class ChatFileCreateEAIService extends AbsEAIService { @Override public DWEAIResult execute(Map headers, String messageBody) throws Exception { EAIRequest eaiRequest = EAIRequest.build(messageBody); - ChatFileEntity chatFileInfo = eaiRequest.getObject("chat_file_info", new TypeReference(){}); + List chatFileInfoList = eaiRequest.getObject("chat_file_info", new TypeReference>(){}); + ChatFileEntity chatFileInfo = chatFileInfoList.get(0); if (Objects.isNull(chatFileInfo)){ throw new DWBusinessException("缺少必要参数chat_file_info");