Commit 1f5878ed5be8e00e181777cbb04b1b4328cad612
1 parent
7aef30cb
调整controller swagger 注释
Showing
4 changed files
with
31 additions
and
4 deletions
yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatController.java
yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java
yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatMessageController.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.ai.controller; | |
| 2 | + | |
| 3 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 4 | +import lombok.AllArgsConstructor; | |
| 5 | +import lombok.extern.slf4j.Slf4j; | |
| 6 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 7 | +import org.springframework.web.bind.annotation.RestController; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * chat message | |
| 11 | + * | |
| 12 | + * @author fansili | |
| 13 | + * @time 2024/4/24 17:22 | |
| 14 | + * @since 1.0 | |
| 15 | + */ | |
| 16 | +@Tag(name = "A3-聊天-对话") | |
| 17 | +@RestController | |
| 18 | +@RequestMapping("/ai/chat/conversation") | |
| 19 | +@Slf4j | |
| 20 | +@AllArgsConstructor | |
| 21 | +public class ChatMessageController { | |
| 22 | +} | ... | ... |
yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatRoleController.java
| 1 | 1 | package cn.iocoder.yudao.module.ai.controller; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | |
| 4 | 5 | import cn.iocoder.yudao.module.ai.service.ChatRoleService; |
| 5 | 6 | import cn.iocoder.yudao.module.ai.vo.*; |
| 6 | 7 | import io.swagger.v3.oas.annotations.Operation; |
| 8 | +import io.swagger.v3.oas.annotations.tags.Tag; | |
| 7 | 9 | import lombok.AllArgsConstructor; |
| 10 | +import lombok.extern.slf4j.Slf4j; | |
| 8 | 11 | import org.springframework.validation.annotation.Validated; |
| 9 | 12 | import org.springframework.web.bind.annotation.*; |
| 10 | 13 | |
| ... | ... | @@ -14,8 +17,10 @@ import org.springframework.web.bind.annotation.*; |
| 14 | 17 | * @fansili |
| 15 | 18 | * @since v1.0 |
| 16 | 19 | */ |
| 20 | +@Tag(name = "A4-chat角色") | |
| 17 | 21 | @RestController |
| 18 | -@RequestMapping("/chat-role") | |
| 22 | +@RequestMapping("/ai/chat/role") | |
| 23 | +@Slf4j | |
| 19 | 24 | @AllArgsConstructor |
| 20 | 25 | public class ChatRoleController { |
| 21 | 26 | |
| ... | ... | @@ -23,7 +28,7 @@ public class ChatRoleController { |
| 23 | 28 | |
| 24 | 29 | @Operation(summary = "chat角色 - 角色列表") |
| 25 | 30 | @GetMapping("/list") |
| 26 | - public CommonResult<ChatRoleListRes> list(@Validated @ModelAttribute ChatRoleListReq req) { | |
| 31 | + public PageResult<ChatRoleListRes> list(@Validated @ModelAttribute ChatRoleListReq req) { | |
| 27 | 32 | return chatRoleService.list(req); |
| 28 | 33 | } |
| 29 | 34 | ... | ... |