|
|
@@ -68,10 +68,10 @@ public class AitagTagCategoryController {
|
|
|
|
|
|
@ApiOperationType("启用标签体系")
|
|
|
@PostMapping("/enable")
|
|
|
- public Result<Void> enableCategory(@RequestParam String id) {
|
|
|
+ public Result<Void> enableCategory(@Validated @RequestBody AitagTagCategoryOperationDto dto) {
|
|
|
try {
|
|
|
- aiTagCategoryService.enableCategory(id);
|
|
|
- fastApiService.categorySync(id);
|
|
|
+ aiTagCategoryService.enableCategory(dto.getId());
|
|
|
+ fastApiService.categorySync(dto.getId());
|
|
|
return Result.success();
|
|
|
} catch (Exception e) {
|
|
|
return Result.error("500", "启用标签体系失败:" + e.getMessage());
|
|
|
@@ -80,10 +80,10 @@ public class AitagTagCategoryController {
|
|
|
|
|
|
@ApiOperationType("停用标签体系")
|
|
|
@PostMapping("/disable")
|
|
|
- public Result<Void> disableCategory(@RequestParam String id) {
|
|
|
+ public Result<Void> disableCategory(@Validated @RequestBody AitagTagCategoryOperationDto dto) {
|
|
|
try {
|
|
|
- aiTagCategoryService.disableCategory(id);
|
|
|
- fastApiService.categorySync(id);
|
|
|
+ aiTagCategoryService.disableCategory(dto.getId());
|
|
|
+ fastApiService.categorySync(dto.getId());
|
|
|
return Result.success();
|
|
|
} catch (Exception e) {
|
|
|
return Result.error("500", "停用标签体系失败:" + e.getMessage());
|
|
|
@@ -92,15 +92,16 @@ public class AitagTagCategoryController {
|
|
|
|
|
|
@ApiOperationType("删除标签体系")
|
|
|
@PostMapping("/delete")
|
|
|
- public Result<Void> deleteCategory(@RequestParam String id) {
|
|
|
+ public Result<Void> deleteCategory(@Validated @RequestBody AitagTagCategoryOperationDto dto) {
|
|
|
try {
|
|
|
- aiTagCategoryService.deleteCategory(id);
|
|
|
+ aiTagCategoryService.deleteCategory(dto.getId());
|
|
|
return Result.success();
|
|
|
} catch (Exception e) {
|
|
|
return Result.error("500", "删除标签体系失败:" + e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@ApiOperationType("已启用标签体系列表一览")
|
|
|
@PostMapping("/enablelist")
|
|
|
public Result<List<AitagTagCategoryVo>> listEnabledCategories(@RequestBody AitagEnabledTagCategoryListDto dto) {
|