Commit b9343878 authored by alex yao's avatar alex yao

fix:修复长文档接口异常

parent 94f4a2e9
......@@ -111,7 +111,7 @@ public class LongTextDialoguesServiceImpl implements LongTextDialoguesService {
//更新标题
if (StringUtils.isBlank(aiDialoguesEntity.getTitle())) { // 标题
aiDialoguesEntity.setTitle(input.substring(0, Math.min(input.length(), 150)));
aiDialoguesEntity = bizAiDialoguesService.save(aiDialoguesEntity);
aiDialoguesEntity = bizAiDialoguesService.update(aiDialoguesEntity);
}
BizAgentApplicationDialoguesRecordEntity dialoguesRecordEntity = new BizAgentApplicationDialoguesRecordEntity();
dialoguesRecordEntity.setDialogsId(dialoguesId);
......@@ -128,7 +128,7 @@ public class LongTextDialoguesServiceImpl implements LongTextDialoguesService {
}
// 文件是否变更
boolean isFileUrlChanged = (StringUtils.isNotBlank(fileUrl) && !aiDialoguesEntity.getFileUrl().equals(fileUrl))
boolean isFileUrlChanged = (StringUtils.isNotBlank(fileUrl) && !fileUrl.equals(aiDialoguesEntity.getFileUrl()))
|| isInit;
if (StringUtils.isBlank(fileUrl)) {
......@@ -139,7 +139,7 @@ public class LongTextDialoguesServiceImpl implements LongTextDialoguesService {
if (isFileUrlChanged) {
if (!isInit && StringUtils.isNotBlank(fileUrl)) {
aiDialoguesEntity.setFileUrl(fileUrl);
bizAiDialoguesService.save(aiDialoguesEntity);
bizAiDialoguesService.update(aiDialoguesEntity);
}
}
......@@ -193,7 +193,7 @@ public class LongTextDialoguesServiceImpl implements LongTextDialoguesService {
assistantRecord.setTimestamp(System.currentTimeMillis());
bizAgentApplicationDialoguesRecordService.save(inputRecord);
bizAgentApplicationDialoguesRecordService.save(inputRecord);
bizAgentApplicationDialoguesRecordService.save(assistantRecord);
}
@Override
......
......@@ -98,7 +98,7 @@ public class PortalServiceImpl implements PortalService {
if (StringUtils.isBlank(bizAiDialoguesEntities.get(0).getTitle())) {
BizAiDialoguesEntity portalDialoguesEntity = bizAiDialoguesEntities.get(0);
portalDialoguesEntity.setTitle(callEntity.getInput());
bizAiDialoguesService.save(portalDialoguesEntity);
bizAiDialoguesService.update(portalDialoguesEntity);
}
// 获取对话配置
......
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