🎉 2.2.1.RELEASE
This commit is contained in:
parent
cb4db10f43
commit
3fc237206f
|
|
@ -46,7 +46,6 @@ import java.util.Map;
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RequestMapping("/menu")
|
@RequestMapping("/menu")
|
||||||
@Api(value = "菜单", tags = "菜单")
|
@Api(value = "菜单", tags = "菜单")
|
||||||
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
|
||||||
public class MenuController extends BladeController {
|
public class MenuController extends BladeController {
|
||||||
|
|
||||||
private IMenuService menuService;
|
private IMenuService menuService;
|
||||||
|
|
@ -57,6 +56,7 @@ public class MenuController extends BladeController {
|
||||||
* 详情
|
* 详情
|
||||||
*/
|
*/
|
||||||
@GetMapping("/detail")
|
@GetMapping("/detail")
|
||||||
|
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
||||||
@ApiOperation(value = "详情", notes = "传入menu", position = 1)
|
@ApiOperation(value = "详情", notes = "传入menu", position = 1)
|
||||||
public R<MenuVO> detail(Menu menu) {
|
public R<MenuVO> detail(Menu menu) {
|
||||||
Menu detail = menuService.getOne(Condition.getQueryWrapper(menu));
|
Menu detail = menuService.getOne(Condition.getQueryWrapper(menu));
|
||||||
|
|
@ -72,6 +72,7 @@ public class MenuController extends BladeController {
|
||||||
@ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"),
|
@ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"),
|
||||||
@ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string")
|
@ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string")
|
||||||
})
|
})
|
||||||
|
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
||||||
@ApiOperation(value = "列表", notes = "传入menu", position = 2)
|
@ApiOperation(value = "列表", notes = "传入menu", position = 2)
|
||||||
public R<List<MenuVO>> list(@ApiIgnore @RequestParam Map<String, Object> menu) {
|
public R<List<MenuVO>> list(@ApiIgnore @RequestParam Map<String, Object> menu) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
|
@ -84,6 +85,7 @@ public class MenuController extends BladeController {
|
||||||
* 前端菜单数据
|
* 前端菜单数据
|
||||||
*/
|
*/
|
||||||
@GetMapping("/routes")
|
@GetMapping("/routes")
|
||||||
|
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
||||||
@ApiOperation(value = "前端菜单数据", notes = "前端菜单数据", position = 3)
|
@ApiOperation(value = "前端菜单数据", notes = "前端菜单数据", position = 3)
|
||||||
public R<List<MenuVO>> routes(BladeUser user) {
|
public R<List<MenuVO>> routes(BladeUser user) {
|
||||||
List<MenuVO> list = menuService.routes(user.getRoleId());
|
List<MenuVO> list = menuService.routes(user.getRoleId());
|
||||||
|
|
@ -94,6 +96,7 @@ public class MenuController extends BladeController {
|
||||||
* 前端按钮数据
|
* 前端按钮数据
|
||||||
*/
|
*/
|
||||||
@GetMapping("/buttons")
|
@GetMapping("/buttons")
|
||||||
|
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
||||||
@ApiOperation(value = "前端按钮数据", notes = "前端按钮数据", position = 4)
|
@ApiOperation(value = "前端按钮数据", notes = "前端按钮数据", position = 4)
|
||||||
public R<List<MenuVO>> buttons(BladeUser user) {
|
public R<List<MenuVO>> buttons(BladeUser user) {
|
||||||
List<MenuVO> list = menuService.buttons(user.getRoleId());
|
List<MenuVO> list = menuService.buttons(user.getRoleId());
|
||||||
|
|
@ -104,6 +107,7 @@ public class MenuController extends BladeController {
|
||||||
* 获取菜单树形结构
|
* 获取菜单树形结构
|
||||||
*/
|
*/
|
||||||
@GetMapping("/tree")
|
@GetMapping("/tree")
|
||||||
|
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
||||||
@ApiOperation(value = "树形结构", notes = "树形结构", position = 5)
|
@ApiOperation(value = "树形结构", notes = "树形结构", position = 5)
|
||||||
public R<List<MenuVO>> tree() {
|
public R<List<MenuVO>> tree() {
|
||||||
List<MenuVO> tree = menuService.tree();
|
List<MenuVO> tree = menuService.tree();
|
||||||
|
|
@ -114,6 +118,7 @@ public class MenuController extends BladeController {
|
||||||
* 获取权限分配树形结构
|
* 获取权限分配树形结构
|
||||||
*/
|
*/
|
||||||
@GetMapping("/grant-tree")
|
@GetMapping("/grant-tree")
|
||||||
|
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
||||||
@ApiOperation(value = "权限分配树形结构", notes = "权限分配树形结构", position = 6)
|
@ApiOperation(value = "权限分配树形结构", notes = "权限分配树形结构", position = 6)
|
||||||
public R<List<MenuVO>> grantTree(BladeUser user) {
|
public R<List<MenuVO>> grantTree(BladeUser user) {
|
||||||
return R.data(menuService.grantTree(user));
|
return R.data(menuService.grantTree(user));
|
||||||
|
|
@ -123,6 +128,7 @@ public class MenuController extends BladeController {
|
||||||
* 获取权限分配树形结构
|
* 获取权限分配树形结构
|
||||||
*/
|
*/
|
||||||
@GetMapping("/role-tree-keys")
|
@GetMapping("/role-tree-keys")
|
||||||
|
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
||||||
@ApiOperation(value = "角色所分配的树", notes = "角色所分配的树", position = 7)
|
@ApiOperation(value = "角色所分配的树", notes = "角色所分配的树", position = 7)
|
||||||
public R<List<String>> roleTreeKeys(String roleIds) {
|
public R<List<String>> roleTreeKeys(String roleIds) {
|
||||||
return R.data(menuService.roleTreeKeys(roleIds));
|
return R.data(menuService.roleTreeKeys(roleIds));
|
||||||
|
|
@ -132,6 +138,7 @@ public class MenuController extends BladeController {
|
||||||
* 新增或修改
|
* 新增或修改
|
||||||
*/
|
*/
|
||||||
@PostMapping("/submit")
|
@PostMapping("/submit")
|
||||||
|
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
||||||
@ApiOperation(value = "新增或修改", notes = "传入menu", position = 8)
|
@ApiOperation(value = "新增或修改", notes = "传入menu", position = 8)
|
||||||
public R submit(@Valid @RequestBody Menu menu) {
|
public R submit(@Valid @RequestBody Menu menu) {
|
||||||
return R.status(menuService.saveOrUpdate(menu));
|
return R.status(menuService.saveOrUpdate(menu));
|
||||||
|
|
@ -142,6 +149,7 @@ public class MenuController extends BladeController {
|
||||||
* 删除
|
* 删除
|
||||||
*/
|
*/
|
||||||
@PostMapping("/remove")
|
@PostMapping("/remove")
|
||||||
|
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
||||||
@ApiOperation(value = "删除", notes = "传入ids", position = 9)
|
@ApiOperation(value = "删除", notes = "传入ids", position = 9)
|
||||||
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
|
||||||
return R.status(menuService.removeByIds(Func.toIntList(ids)));
|
return R.status(menuService.removeByIds(Func.toIntList(ids)));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user