ZengTao
2023-12-07 800f3b71efdb0a9d2fb2c1f688cc194c88960d25
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
package com.example.springboot.controller;
 
import com.example.springboot.entity.vo.Result;
import com.example.springboot.entity.vo.RoleMenuListVo;
import com.example.springboot.service.RoleMenuListService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
@RestController
@Slf4j
@Api(tags = "角色和菜单关系")
@RequestMapping("/api/roleMenuList")
public class RoleMenuListController {
    @Autowired
    private RoleMenuListService roleMenuListService;
 
    @ApiOperation(value = "分页查询角色和菜单关系")
    @GetMapping("/selectPage")
    @RequiresRoles({"admin"})
    public Result selectPage(RoleMenuListVo roleMenuListVO) {
        return Result.success(roleMenuListService.selectPage(roleMenuListVO));
    }
}