Browse Source

Merge branch 'sprint/S3' into release/S3

master
clong 1 year ago
parent
commit
a484a46960
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/chatFile/service/chatFile/ChatFileCreateEAIService.java

+ 2
- 3
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/chatFile/service/chatFile/ChatFileCreateEAIService.java View File

@ -1,8 +1,6 @@
package com.digiwin.athena.app.chatFile.service.chatFile; package com.digiwin.athena.app.chatFile.service.chatFile;
import com.alibaba.fastjson.TypeReference; 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.container.exceptions.DWBusinessException;
import com.digiwin.app.service.DWEAIResult; import com.digiwin.app.service.DWEAIResult;
import com.digiwin.athena.app.chatFile.infra.entity.ChatFileEntity; import com.digiwin.athena.app.chatFile.infra.entity.ChatFileEntity;
@ -37,7 +35,8 @@ public class ChatFileCreateEAIService extends AbsEAIService {
@Override @Override
public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception { public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception {
EAIRequest eaiRequest = EAIRequest.build(messageBody); EAIRequest eaiRequest = EAIRequest.build(messageBody);
ChatFileEntity chatFileInfo = eaiRequest.getObject("chat_file_info", new TypeReference<ChatFileEntity>(){});
List<ChatFileEntity> chatFileInfoList = eaiRequest.getObject("chat_file_info", new TypeReference<List<ChatFileEntity>>(){});
ChatFileEntity chatFileInfo = chatFileInfoList.get(0);
if (Objects.isNull(chatFileInfo)){ if (Objects.isNull(chatFileInfo)){
throw new DWBusinessException("缺少必要参数chat_file_info"); throw new DWBusinessException("缺少必要参数chat_file_info");


Loading…
Cancel
Save