Commit 2b20f468 authored by alex yao's avatar alex yao

fix: 门户页对话保存

parent c12e553e
...@@ -91,8 +91,27 @@ public class PortalServiceImpl implements PortalService { ...@@ -91,8 +91,27 @@ public class PortalServiceImpl implements PortalService {
@Resource @Resource
private BizAgentApplicationPluginService bizAgentApplicationPluginService; private BizAgentApplicationPluginService bizAgentApplicationPluginService;
@Resource
private BizAiDialoguesService bizAiDialoguesService;
@Override @Override
public void call(PortalDialoguesCallEntity callEntity, Long userId) throws Exception { public void call(PortalDialoguesCallEntity callEntity, Long userId) throws Exception {
BizAiDialoguesEntity bizAiDialoguesEntity = new BizAiDialoguesEntity();
bizAiDialoguesEntity.setDialoguesType(callEntity.getDialoguesId());
bizAiDialoguesEntity.setMemberId(userId);
bizAiDialoguesEntity.setIsDeleted(CommonConstant.IsDeleted.N);
List<BizAiDialoguesEntity> bizAiDialoguesEntities = bizAiDialoguesService.findByExample(bizAiDialoguesEntity, null);
if (CollectionUtils.isNotEmpty(bizAiDialoguesEntities)) {
throw new BusinessException("当前对话不存在");
}
BizAiDialoguesEntity aiDialoguesEntity = bizAiDialoguesEntities.get(0);
if (StringUtils.isBlank(aiDialoguesEntity.getTitle())) {
aiDialoguesEntity.setTitle(callEntity.getInput());
bizAiDialoguesService.update(aiDialoguesEntity);
}
//记录提问时间 //记录提问时间
long inputTimestamp = System.currentTimeMillis(); long inputTimestamp = System.currentTimeMillis();
SSEUtil sseUtil = new SSEUtil(); SSEUtil sseUtil = new SSEUtil();
......
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