|
@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
*/
|
|
|
@Tag(name = "A4-chat角色")
|
|
|
@RestController
|
|
|
-@RequestMapping("/ai/chat/role")
|
|
|
+@RequestMapping("/ai/chat")
|
|
|
@Slf4j
|
|
|
@AllArgsConstructor
|
|
|
public class ChatRoleController {
|
|
@@ -27,34 +27,35 @@ public class ChatRoleController {
|
|
|
private final ChatRoleService chatRoleService;
|
|
|
|
|
|
@Operation(summary = "chat角色 - 角色列表")
|
|
|
- @GetMapping("/list")
|
|
|
+ @GetMapping("/role/list")
|
|
|
public PageResult<ChatRoleListRes> list(@Validated @ModelAttribute ChatRoleListReq req) {
|
|
|
return chatRoleService.list(req);
|
|
|
}
|
|
|
|
|
|
@Operation(summary = "chat角色 - 添加")
|
|
|
- @PutMapping("/add")
|
|
|
+ @PutMapping("/role")
|
|
|
public CommonResult<Void> add(@Validated @RequestBody ChatRoleAddReq req) {
|
|
|
chatRoleService.add(req);
|
|
|
return CommonResult.success(null);
|
|
|
}
|
|
|
|
|
|
@Operation(summary = "chat角色 - 修改")
|
|
|
- @PostMapping("/update")
|
|
|
- public CommonResult<Void> update(@Validated @RequestBody ChatRoleUpdateReq req) {
|
|
|
- chatRoleService.update(req);
|
|
|
+ @PostMapping("/role/{id}")
|
|
|
+ public CommonResult<Void> update(@PathVariable("id") Long id,
|
|
|
+ @Validated @RequestBody ChatRoleUpdateReq req) {
|
|
|
+ chatRoleService.update(id, req);
|
|
|
return CommonResult.success(null);
|
|
|
}
|
|
|
|
|
|
@Operation(summary = "chat角色 - 修改可见性")
|
|
|
- @PostMapping("/update-visibility")
|
|
|
+ @PostMapping("/role/update-visibility")
|
|
|
public CommonResult<Void> updateVisibility(@Validated @RequestBody ChatRoleUpdateVisibilityReq req) {
|
|
|
chatRoleService.updateVisibility(req);
|
|
|
return CommonResult.success(null);
|
|
|
}
|
|
|
|
|
|
@Operation(summary = "chat角色 - 修改可见性")
|
|
|
- @DeleteMapping("/delete")
|
|
|
+ @DeleteMapping("/role")
|
|
|
public CommonResult<Void> delete(@RequestParam("chatRoleId") Long chatRoleId) {
|
|
|
chatRoleService.delete(chatRoleId);
|
|
|
return CommonResult.success(null);
|