Commit 83d17051bea6ea09377f2063764c5d841a644b73
1 parent
5d6a3ff0
调整 controller url
Showing
1 changed file
with
5 additions
and
5 deletions
yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java
| @@ -37,20 +37,20 @@ public class ChatConversationController { | @@ -37,20 +37,20 @@ public class ChatConversationController { | ||
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | @Operation(summary = "获取 - 获取对话") | 39 | @Operation(summary = "获取 - 获取对话") |
| 40 | - @GetMapping("/getConversation") | ||
| 41 | - public CommonResult<ChatConversationRes> getConversation(@RequestParam("id") Long id) { | 40 | + @GetMapping("/{id}") |
| 41 | + public CommonResult<ChatConversationRes> getConversation(@PathVariable("id") Long id) { | ||
| 42 | return CommonResult.success(chatConversationService.getConversation(id)); | 42 | return CommonResult.success(chatConversationService.getConversation(id)); |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | @Operation(summary = "获取 - 获取对话list") | 45 | @Operation(summary = "获取 - 获取对话list") |
| 46 | - @GetMapping("/listConversation") | 46 | + @GetMapping("/list") |
| 47 | public CommonResult<List<ChatConversationRes>> listConversation(@ModelAttribute @Validated ChatConversationListReq req) { | 47 | public CommonResult<List<ChatConversationRes>> listConversation(@ModelAttribute @Validated ChatConversationListReq req) { |
| 48 | return CommonResult.success(chatConversationService.listConversation(req)); | 48 | return CommonResult.success(chatConversationService.listConversation(req)); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | @Operation(summary = "删除") | 51 | @Operation(summary = "删除") |
| 52 | - @DeleteMapping("/listConversation") | ||
| 53 | - public CommonResult<Void> delete(@RequestParam("id") Long id) { | 52 | + @DeleteMapping("/{id}") |
| 53 | + public CommonResult<Void> delete(@PathVariable("id") Long id) { | ||
| 54 | chatConversationService.delete(id); | 54 | chatConversationService.delete(id); |
| 55 | return CommonResult.success(null); | 55 | return CommonResult.success(null); |
| 56 | } | 56 | } |