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
| @@ -29,7 +29,7 @@ import java.util.function.Consumer; | @@ -29,7 +29,7 @@ import java.util.function.Consumer; | ||
| 29 | * @time 2024/4/13 17:44 | 29 | * @time 2024/4/13 17:44 |
| 30 | * @since 1.0 | 30 | * @since 1.0 |
| 31 | */ | 31 | */ |
| 32 | -@Tag(name = "AI模块") | 32 | +@Tag(name = "A1-AI聊天") |
| 33 | @RestController | 33 | @RestController |
| 34 | @RequestMapping("/ai") | 34 | @RequestMapping("/ai") |
| 35 | @Slf4j | 35 | @Slf4j |
yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/ChatConversationController.java
| @@ -22,7 +22,7 @@ import java.util.List; | @@ -22,7 +22,7 @@ import java.util.List; | ||
| 22 | * @time 2024/4/13 17:44 | 22 | * @time 2024/4/13 17:44 |
| 23 | * @since 1.0 | 23 | * @since 1.0 |
| 24 | */ | 24 | */ |
| 25 | -@Tag(name = "A2聊天-对话") | 25 | +@Tag(name = "A2-聊天-对话") |
| 26 | @RestController | 26 | @RestController |
| 27 | @RequestMapping("/ai/chat/conversation") | 27 | @RequestMapping("/ai/chat/conversation") |
| 28 | @Slf4j | 28 | @Slf4j |
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 | package cn.iocoder.yudao.module.ai.controller; | 1 | package cn.iocoder.yudao.module.ai.controller; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; | 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 4 | import cn.iocoder.yudao.module.ai.service.ChatRoleService; | 5 | import cn.iocoder.yudao.module.ai.service.ChatRoleService; |
| 5 | import cn.iocoder.yudao.module.ai.vo.*; | 6 | import cn.iocoder.yudao.module.ai.vo.*; |
| 6 | import io.swagger.v3.oas.annotations.Operation; | 7 | import io.swagger.v3.oas.annotations.Operation; |
| 8 | +import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 7 | import lombok.AllArgsConstructor; | 9 | import lombok.AllArgsConstructor; |
| 10 | +import lombok.extern.slf4j.Slf4j; | ||
| 8 | import org.springframework.validation.annotation.Validated; | 11 | import org.springframework.validation.annotation.Validated; |
| 9 | import org.springframework.web.bind.annotation.*; | 12 | import org.springframework.web.bind.annotation.*; |
| 10 | 13 | ||
| @@ -14,8 +17,10 @@ import org.springframework.web.bind.annotation.*; | @@ -14,8 +17,10 @@ import org.springframework.web.bind.annotation.*; | ||
| 14 | * @fansili | 17 | * @fansili |
| 15 | * @since v1.0 | 18 | * @since v1.0 |
| 16 | */ | 19 | */ |
| 20 | +@Tag(name = "A4-chat角色") | ||
| 17 | @RestController | 21 | @RestController |
| 18 | -@RequestMapping("/chat-role") | 22 | +@RequestMapping("/ai/chat/role") |
| 23 | +@Slf4j | ||
| 19 | @AllArgsConstructor | 24 | @AllArgsConstructor |
| 20 | public class ChatRoleController { | 25 | public class ChatRoleController { |
| 21 | 26 | ||
| @@ -23,7 +28,7 @@ public class ChatRoleController { | @@ -23,7 +28,7 @@ public class ChatRoleController { | ||
| 23 | 28 | ||
| 24 | @Operation(summary = "chat角色 - 角色列表") | 29 | @Operation(summary = "chat角色 - 角色列表") |
| 25 | @GetMapping("/list") | 30 | @GetMapping("/list") |
| 26 | - public CommonResult<ChatRoleListRes> list(@Validated @ModelAttribute ChatRoleListReq req) { | 31 | + public PageResult<ChatRoleListRes> list(@Validated @ModelAttribute ChatRoleListReq req) { |
| 27 | return chatRoleService.list(req); | 32 | return chatRoleService.list(req); |
| 28 | } | 33 | } |
| 29 | 34 |