Commit 198dae62c007f4240321cf373fe8195049e2ff96
1 parent
99d477ac
【优化】处理 CommonResult Void 情况
Showing
1 changed file
with
4 additions
and
4 deletions
yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/controller/AiChatModalController.java
| @@ -38,14 +38,14 @@ public class AiChatModalController { | @@ -38,14 +38,14 @@ public class AiChatModalController { | ||
| 38 | 38 | ||
| 39 | @Operation(summary = "ai模型 - 添加") | 39 | @Operation(summary = "ai模型 - 添加") |
| 40 | @PutMapping("/modal") | 40 | @PutMapping("/modal") |
| 41 | - public CommonResult add(@RequestBody @Validated AiChatModalAddReq req) { | 41 | + public CommonResult<Void> add(@RequestBody @Validated AiChatModalAddReq req) { |
| 42 | aiChatModalService.add(req); | 42 | aiChatModalService.add(req); |
| 43 | return CommonResult.success(null); | 43 | return CommonResult.success(null); |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | @Operation(summary = "ai模型 - 模型照片上传") | 46 | @Operation(summary = "ai模型 - 模型照片上传") |
| 47 | @PostMapping("/modal/{id}/updateImage") | 47 | @PostMapping("/modal/{id}/updateImage") |
| 48 | - public CommonResult updateImage(@PathVariable("id") Long id, | 48 | + public CommonResult<Void> updateImage(@PathVariable("id") Long id, |
| 49 | MultipartFile file) { | 49 | MultipartFile file) { |
| 50 | // todo yunai 文件上传这里放哪里 | 50 | // todo yunai 文件上传这里放哪里 |
| 51 | return CommonResult.success(null); | 51 | return CommonResult.success(null); |
| @@ -53,7 +53,7 @@ public class AiChatModalController { | @@ -53,7 +53,7 @@ public class AiChatModalController { | ||
| 53 | 53 | ||
| 54 | @Operation(summary = "ai模型 - 修改") | 54 | @Operation(summary = "ai模型 - 修改") |
| 55 | @PostMapping("/modal/{id}") | 55 | @PostMapping("/modal/{id}") |
| 56 | - public CommonResult update(@PathVariable Long id, | 56 | + public CommonResult<Void> update(@PathVariable Long id, |
| 57 | @RequestBody @Validated AiChatModalAddReq req) { | 57 | @RequestBody @Validated AiChatModalAddReq req) { |
| 58 | aiChatModalService.update(id, req); | 58 | aiChatModalService.update(id, req); |
| 59 | return CommonResult.success(null); | 59 | return CommonResult.success(null); |
| @@ -61,7 +61,7 @@ public class AiChatModalController { | @@ -61,7 +61,7 @@ public class AiChatModalController { | ||
| 61 | 61 | ||
| 62 | @Operation(summary = "ai模型 - 删除") | 62 | @Operation(summary = "ai模型 - 删除") |
| 63 | @DeleteMapping("/modal/{id}") | 63 | @DeleteMapping("/modal/{id}") |
| 64 | - public CommonResult delete(@PathVariable Long id) { | 64 | + public CommonResult<Void> delete(@PathVariable Long id) { |
| 65 | aiChatModalService.delete(id); | 65 | aiChatModalService.delete(id); |
| 66 | return CommonResult.success(null); | 66 | return CommonResult.success(null); |
| 67 | } | 67 | } |