@RestController @RequestMapping(value="/category") public class CategoryController extends Object
Constructor and Description |
---|
CategoryController() |
Modifier and Type | Method and Description |
---|---|
Result<String> |
addCategory(Category category)
新增分类(菜品分类和套餐分类)
|
Result<String> |
delete(Long id)
根据id删除菜品(外键删除)
|
Result<com.baomidou.mybatisplus.extension.plugins.pagination.Page> |
getAllByPage(Integer page,
Integer pageSize)
分页查询
|
Result<List<Category>> |
getCategoryType(Category category)
新建菜品时,下拉框回显菜品分类(type=1 or type=2)
根据条件查询菜品分类
|
Result<String> |
update(Category category)
更新分类
|
@GetMapping(value="/page") public Result<com.baomidou.mybatisplus.extension.plugins.pagination.Page> getAllByPage(Integer page, Integer pageSize)
page
- pageSize
- @PostMapping public Result<String> addCategory(@RequestBody Category category)
category
- @PutMapping public Result<String> update(@RequestBody Category category)
category
- @DeleteMapping public Result<String> delete(Long id)
id
- Copyright © 2022. All rights reserved.