♻️ Refactoring code.规范方法命名含义
This commit is contained in:
1 parent
bf0cf11349
commit
e030653d40
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -70,7 +70,7 @@ public class SecurityUtils {
|
||||
* 获取用户角色信息
|
||||
* @return 角色集合
|
||||
*/
|
||||
public List<Long> getRoles() {
|
||||
public List<Long> getRoleIds() {
|
||||
Authentication authentication = getAuthentication();
|
||||
Collection<? extends GrantedAuthority> authorities = authentication.getAuthorities();
|
||||
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ public class SysMenuController {
|
||||
public R getUserMenu(String type, Long parentId) {
|
||||
// 获取符合条件的菜单
|
||||
Set<SysMenu> all = new HashSet<>();
|
||||
SecurityUtils.getRoles().forEach(roleId -> all.addAll(sysMenuService.findMenuByRoleId(roleId)));
|
||||
SecurityUtils.getRoleIds().forEach(roleId -> all.addAll(sysMenuService.findMenuByRoleId(roleId)));
|
||||
return R.ok(sysMenuService.filterMenu(all, type, parentId));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user