18586361686
2025-04-17 e4a9a66e1bbaa6456fcbe27fc2a653cc6e9130dc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package tech.aiflowy.ai.controller;
 
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import tech.aiflowy.ai.entity.AiBotConversationMessage;
import tech.aiflowy.ai.service.AiBotConversationMessageService;
import tech.aiflowy.common.domain.Result;
import tech.aiflowy.common.web.controller.BaseCurdController;
 
import javax.annotation.Resource;
import java.math.BigInteger;
 
@RestController
@RequestMapping("/api/v1/conversation")
public class AIBotConversationExternalMessageController extends BaseCurdController<AiBotConversationMessageService, AiBotConversationMessage> {
 
    @Resource
    private AiBotConversationMessageService conversationMessageService;
 
 
    public AIBotConversationExternalMessageController(AiBotConversationMessageService service) {
        super(service);
    }
 
    @GetMapping("externalList")
    public Result externalList(@RequestParam(value = "botId") BigInteger botId) {
 
        return conversationMessageService.externalList(botId);
    }
 
    @GetMapping("deleteConversation")
    public Result deleteConversation(@RequestParam(value = "botId") String botId,
                                     @RequestParam(value = "sessionId") String sessionId
    ) {
 
        return conversationMessageService.deleteConversation(botId, sessionId);
    }
 
    @GetMapping("updateConversation")
    public Result updateConversation(@RequestParam(value = "botId") String botId,
                                     @RequestParam(value = "sessionId") String sessionId,
                                     @RequestParam(value = "title") String title
    ) {
 
        return conversationMessageService.updateConversation(botId, sessionId, title);
    }
}