lxw
2023-04-24 e2b4ed00f1a0012236e737a608ecfb2abbfc2eb4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.pojo.Menu;
import com.whyc.service.MenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
@RestController
@RequestMapping("menu")
@Api(tags = "系统设置-系统配置-菜单")
public class MenuController {
 
    @Autowired
    private MenuService service;
 
    @GetMapping("list")
    @ApiOperation(value = "查询列表")
    public Response<List<Menu>> getList(){
        List<Menu> menuList = service.getList();
        return new Response<List<Menu>>().set(1,menuList);
    }
 
    @PostMapping("menuList")
    @ApiOperation(value = "更新菜单列表")
    public Response updateMenuList(@RequestBody List<Menu> menuList){
        return service.updateMenuList(menuList);
    }
 
}