完成了基本的商品管理

This commit is contained in:
chen-xin-zhi 2024-10-29 22:51:58 +08:00
parent bec180a76e
commit 935cc4b0bd

View File

@ -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<List<Category>> listCategory() {
List<Category> list = categoryService.list();
return ResultUtils.success(list);
}
}