From 935cc4b0bd8a8cc88ad3b7a779811e15ac72aea9 Mon Sep 17 00:00:00 2001 From: chen-xin-zhi <3588068430@qq.com> Date: Tue, 29 Oct 2024 22:51:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=BA=86=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E7=9A=84=E5=95=86=E5=93=81=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/operategood/CategoryController.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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); + } + + }