feat: 商品分类属性列表接口添加示例值

This commit is contained in:
Ray.Hao 2024-05-23 20:32:59 +08:00
parent c75a80954c
commit df5c914a17

View File

@ -74,8 +74,8 @@ public class CategoryController {
@Operation(summary = "获取商品分类的属性列表")
@GetMapping("/{categoryId}/attributes")
public Result<List<Option>> listAttributesByCategoryId(
@Parameter(description = "商品分类ID") @PathVariable Long categoryId,
@Parameter(description = "属性类型") @RequestParam AttributeTypeEnum type
@Parameter(description = "商品分类ID", example = "3") @PathVariable Long categoryId,
@Parameter(description = "属性类型", example = "BASE") @RequestParam AttributeTypeEnum type
) {
List<Option> list = categoryService.listAttributesByCategoryId(categoryId, type);
return Result.success(list);