服务层重构与优化:补全所有ServiceImpl实现类,修复RestTemplate注入,完善DTO与配置,保证编译与启动通过
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package com.emotion.controller;
|
||||
|
||||
import com.emotion.service.AiService;
|
||||
import com.emotion.service.AIChatService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -31,7 +31,7 @@ public class WebSocketController {
|
||||
private SimpMessagingTemplate messagingTemplate;
|
||||
|
||||
@Autowired
|
||||
private AiService aiService;
|
||||
private AIChatService aiChatService;
|
||||
|
||||
// 已移除旧的WebSocket消息处理方法,使用新的ChatWebSocketController
|
||||
|
||||
@@ -51,7 +51,7 @@ public class WebSocketController {
|
||||
String userId = (String) chatMessage.get("userId");
|
||||
|
||||
// 调用AI服务
|
||||
String aiReply = aiService.sendMessage(conversationId, content, userId);
|
||||
String aiReply = aiChatService.sendMessage(conversationId, content, userId);
|
||||
|
||||
// 构建AI回复消息
|
||||
Map<String, Object> aiResponse = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user