|
|
|
@ -2,12 +2,10 @@ package com.shxy.xymanager_admin.controller;
|
|
|
|
|
|
|
|
|
|
import com.shxy.xymanager_common.base.BaseController;
|
|
|
|
|
import com.shxy.xymanager_common.base.ResponseReult;
|
|
|
|
|
import com.shxy.xymanager_common.entity.DyLevel;
|
|
|
|
|
import com.shxy.xymanager_common.entity.TbRole;
|
|
|
|
|
import com.shxy.xymanager_common.entity.TbRoleResource;
|
|
|
|
|
import com.shxy.xymanager_common.exception.ApiException;
|
|
|
|
|
import com.shxy.xymanager_common.model.RolePermissionModel;
|
|
|
|
|
import com.shxy.xymanager_service.service.NewCacheService;
|
|
|
|
|
import com.shxy.xymanager_service.service.RolePermissionService;
|
|
|
|
|
import com.shxy.xymanager_service.service.RoleService;
|
|
|
|
|
|
|
|
|
@ -30,8 +28,6 @@ public class RoleController extends BaseController {
|
|
|
|
|
@Resource
|
|
|
|
|
RoleService service;
|
|
|
|
|
@Resource
|
|
|
|
|
NewCacheService cacheService;
|
|
|
|
|
@Resource
|
|
|
|
|
RolePermissionService permissionService;
|
|
|
|
|
|
|
|
|
|
@GetMapping("listAll")
|
|
|
|
@ -68,13 +64,6 @@ public class RoleController extends BaseController {
|
|
|
|
|
return ResponseReult.success("OK");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping("getPermissionTree")
|
|
|
|
|
@ApiOperation("查询权限树状图")
|
|
|
|
|
public ResponseReult<List<DyLevel>> getPermissionTree() {
|
|
|
|
|
List<DyLevel> list = cacheService.getFullTree();
|
|
|
|
|
return ResponseReult.success(list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping("getPermission")
|
|
|
|
|
@ApiOperation("查询权限")
|
|
|
|
|
public ResponseReult<List<TbRoleResource>> getPermission(@Validated @NotNull(message = "id不能为空!") Integer id) throws Exception {
|
|
|
|
|