|
|
@@ -24,10 +24,11 @@ public class AitagTagCategoryController {
|
|
|
@ApiOperationType("标签体系列表")
|
|
|
@GetMapping("/list")
|
|
|
public Result<List<AitagTagCategoryVo>> listCategories(
|
|
|
+ @RequestParam(required = false) String categoryNm,
|
|
|
@RequestParam(defaultValue = "1") int page,
|
|
|
@RequestParam(defaultValue = "5") int size) {
|
|
|
try {
|
|
|
- Page<AitagTagCategoryVo> pageResult = aiTagCategoryService.listCategories(page, size);
|
|
|
+ Page<AitagTagCategoryVo> pageResult = aiTagCategoryService.listCategories(categoryNm, page, size);
|
|
|
return Result.pageSuccess(pageResult.getRecords(), pageResult.getTotal());
|
|
|
} catch (Exception e) {
|
|
|
return Result.error("500", "分页查询失败:" + e.getMessage());
|
|
|
@@ -56,17 +57,6 @@ public class AitagTagCategoryController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @ApiOperationType("查询标签体系")
|
|
|
- @GetMapping("/query")
|
|
|
- public Result<List<AitagTagCategory>> searchByCategoryNm(@RequestParam String categoryNm) {
|
|
|
- try {
|
|
|
- List<AitagTagCategory> categories = aiTagCategoryService.searchByCategoryNm(categoryNm);
|
|
|
- return Result.success(categories);
|
|
|
- } catch (Exception e) {
|
|
|
- return Result.error("500", "模糊查询失败:" + e.getMessage());
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
@ApiOperationType("启用标签体系")
|
|
|
@PostMapping("/enable")
|
|
|
public Result<Void> enableCategory(@RequestParam String id) {
|