|
|
@@ -7,14 +7,12 @@ import com.huimv.employment.integration.kb.SseStreamSupport;
|
|
7
|
7
|
import com.huimv.employment.security.LoginUser;
|
|
8
|
8
|
import com.huimv.employment.security.LoginUserHolder;
|
|
9
|
9
|
import com.huimv.employment.service.conversation.ConversationChatService;
|
|
10
|
|
-import com.huimv.employment.service.conversation.ConversationDraftQueryService;
|
|
11
|
10
|
import com.huimv.employment.service.conversation.ConversationMessageService;
|
|
12
|
11
|
import com.huimv.employment.service.conversation.ConversationService;
|
|
13
|
12
|
import com.huimv.employment.service.conversation.dto.ConversationChatRequest;
|
|
14
|
13
|
import com.huimv.employment.service.conversation.dto.ConversationCreateRequest;
|
|
15
|
14
|
import com.huimv.employment.service.conversation.dto.ConversationMessagePageResponse;
|
|
16
|
15
|
import com.huimv.employment.service.conversation.dto.ConversationSummaryResponse;
|
|
17
|
|
-import com.huimv.employment.service.draft.dto.DraftDetailResponse;
|
|
18
|
16
|
import io.swagger.v3.oas.annotations.Operation;
|
|
19
|
17
|
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
|
20
|
18
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
@@ -56,16 +54,13 @@ public class ConversationController {
|
|
56
|
54
|
private final ConversationService conversationService;
|
|
57
|
55
|
private final ConversationChatService conversationChatService;
|
|
58
|
56
|
private final ConversationMessageService conversationMessageService;
|
|
59
|
|
- private final ConversationDraftQueryService conversationDraftQueryService;
|
|
60
|
57
|
|
|
61
|
58
|
public ConversationController(ConversationService conversationService,
|
|
62
|
59
|
ConversationChatService conversationChatService,
|
|
63
|
|
- ConversationMessageService conversationMessageService,
|
|
64
|
|
- ConversationDraftQueryService conversationDraftQueryService) {
|
|
|
60
|
+ ConversationMessageService conversationMessageService) {
|
|
65
|
61
|
this.conversationService = conversationService;
|
|
66
|
62
|
this.conversationChatService = conversationChatService;
|
|
67
|
63
|
this.conversationMessageService = conversationMessageService;
|
|
68
|
|
- this.conversationDraftQueryService = conversationDraftQueryService;
|
|
69
|
64
|
}
|
|
70
|
65
|
|
|
71
|
66
|
/**
|
|
|
@@ -111,19 +106,6 @@ public class ConversationController {
|
|
111
|
106
|
loginUser.getUserId(), conversationId, page, size));
|
|
112
|
107
|
}
|
|
113
|
108
|
|
|
114
|
|
- /**
|
|
115
|
|
- * 查询当前会话关联的最新草稿(兜底:消息未带 draft_id 时使用)。
|
|
116
|
|
- */
|
|
117
|
|
- @GetMapping("/{id}/draft")
|
|
118
|
|
- @Operation(summary = "查询会话当前草稿",
|
|
119
|
|
- description = "返回该会话下最新一条 fe_employment_draft 详情(含 fields)。"
|
|
120
|
|
- + "Agent 回复未携带 card_draft 时,前端可在对话结束后调用此接口拉取草稿。")
|
|
121
|
|
- public R<DraftDetailResponse> getConversationDraft(@PathVariable("id") Long conversationId) {
|
|
122
|
|
- LoginUser loginUser = requireEnterprise();
|
|
123
|
|
- return R.ok(conversationDraftQueryService.getDraftByConversation(
|
|
124
|
|
- loginUser.getUserId(), conversationId));
|
|
125
|
|
- }
|
|
126
|
|
-
|
|
127
|
109
|
/**
|
|
128
|
110
|
* 在已有会话内发起 AI 对话(SSE 流式,流结束后落库)。
|
|
129
|
111
|
*/
|