| | |
| | | import com.xiaopeng.common.core.web.controller.BaseController; |
| | | import com.xiaopeng.operation.service.ISysMenuService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | |
| | | * 获取全部菜单树 |
| | | * @return |
| | | */ |
| | | @GetMapping("/api/v1/getMenuTree") |
| | | @GetMapping("/api/v1/getMenuTree/{type}") |
| | | @ApiOperation(value = "获取全部菜单树", tags = {"管理后台-权限组设置"}) |
| | | public R<List<SysMenu>> getMenuTree() { |
| | | List<SysMenu> menus = menuService.getMenuTree(); |
| | | public R<List<SysMenu>> getMenuTree(@ApiParam(name = "type", value = "1=管理端 2=运维app") @PathVariable Integer type) { |
| | | List<SysMenu> menus = menuService.getMenuTree(type); |
| | | return R.ok(menus); |
| | | } |
| | | |
| | |
| | | return R.ok(menuService.getPermission()); |
| | | } |
| | | |
| | | @GetMapping("/api/v1/getAppPermission") |
| | | @ApiOperation(value = "获取获取当前登录用户权限列表", tags = {"运维APP-个人中心"}) |
| | | public R<List<SysMenu>> getAppPermission(){ |
| | | return R.ok(menuService.getAppPermission()); |
| | | } |
| | | |
| | | } |