diff --git a/src/main/java/com/cultural/heritage/controller/operategood/CategoryController.java b/src/main/java/com/cultural/heritage/controller/operategood/CategoryController.java index 1bf6904..fa447c1 100644 --- a/src/main/java/com/cultural/heritage/controller/operategood/CategoryController.java +++ b/src/main/java/com/cultural/heritage/controller/operategood/CategoryController.java @@ -1,6 +1,7 @@ package com.cultural.heritage.controller.operategood; +import com.cultural.heritage.annotation.AuthCheck; import com.cultural.heritage.common.BaseResponse; import com.cultural.heritage.common.ErrorCode; import com.cultural.heritage.common.ResultUtils; @@ -19,6 +20,8 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + @RestController @RequestMapping("/category") @Slf4j @@ -83,4 +86,15 @@ public class CategoryController { } + /** + * 查询商品类别 + * @return 类别列表 + */ + @PostMapping("/list") + public BaseResponse> listCategory() { + List list = categoryService.list(); + return ResultUtils.success(list); + } + + }