|
@@ -1,6 +1,9 @@
|
|
|
package com.ozs.web.controller.system;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
+import java.util.Set;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import javax.validation.constraints.NotEmpty;
|
|
|
|
|
@@ -10,6 +13,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.ozs.common.core.domain.vo.SysRoleRequestVo;
|
|
|
import com.ozs.common.core.domain.vo.SysUserVo;
|
|
|
import com.ozs.system.service.DataScoreUtil;
|
|
|
+import com.ozs.system.service.ISysMenuService;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
@@ -67,6 +71,8 @@ public class SysRoleController extends BaseController
|
|
|
private ISysDeptService deptService;
|
|
|
@Autowired
|
|
|
private DataScoreUtil dataScoreUtil;
|
|
|
+ @Autowired
|
|
|
+ private ISysMenuService menuService;
|
|
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:role:list')")
|
|
|
// @GetMapping("/list")
|
|
@@ -108,8 +114,12 @@ public class SysRoleController extends BaseController
|
|
|
@GetMapping(value = "/{roleId}")
|
|
|
public AjaxResult getInfo(@PathVariable Long roleId)
|
|
|
{
|
|
|
- roleService.checkRoleDataScope(roleId);
|
|
|
- return success(roleService.selectRoleById(roleId));
|
|
|
+// roleService.checkRoleDataScope(roleId);
|
|
|
+ SysRole sysRole = roleService.selectRoleById(roleId);
|
|
|
+ List<Long> rolePerms = menuService.selectMenu(sysRole.getRoleId());
|
|
|
+ Long[] strArr = rolePerms.toArray(new Long[rolePerms.size()]);
|
|
|
+ sysRole.setMenuIds(strArr);
|
|
|
+ return success(sysRole);
|
|
|
}
|
|
|
|
|
|
/**
|