|
|
|
@ -35,7 +35,7 @@ public class ChatSessionServiceImpl implements ChatSessionService {
|
|
|
|
|
private ChatSessionRepository chatSessionRepository;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void createSession() {
|
|
|
|
|
public String createSession() {
|
|
|
|
|
User user = SecurityUtil.getLoginUser();
|
|
|
|
|
String userId = user.getId();
|
|
|
|
|
// 初始化欢迎语
|
|
|
|
@ -49,7 +49,7 @@ public class ChatSessionServiceImpl implements ChatSessionService {
|
|
|
|
|
chatSession.setCreateTime(Instant.now().toEpochMilli());
|
|
|
|
|
chatSession.setUpdateTime(Instant.now().toEpochMilli());
|
|
|
|
|
chatSession.setHistory(history);
|
|
|
|
|
chatSessionRepository.save(chatSession);
|
|
|
|
|
return chatSessionRepository.save(chatSession).getId();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|