@@ -30,16 +30,22 @@ public class MenuBarController {
|
||||
|
||||
@GetMapping("getMenuBarSchList")
|
||||
public List<MenuBar> getMenuBarSchList(BoaUser authUserWithDept) {
|
||||
UserCurrentRole userCurrentRole = userCurrentRoleService.findById(authUserWithDept.getId())
|
||||
.orElseThrow(() -> new com.yunhai.platform.apistd.BizException(com.yunhai.platform.utils.exception.ErrorCode.INTERNAL_SERVER_ERROR));
|
||||
Optional<UserCurrentRole> userCurrentRoleOpt = userCurrentRoleService.findById(authUserWithDept.getId());
|
||||
if (!userCurrentRoleOpt.isPresent()) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
UserCurrentRole userCurrentRole = userCurrentRoleOpt.get();
|
||||
return menuBarService.getMenuBarList(userCurrentRole.getSchId());
|
||||
}
|
||||
|
||||
@GetMapping("getMenuBarList")
|
||||
public List<Map> getMenuBarList(BoaUser authUserWithDept) {
|
||||
List<Map> result = new ArrayList<>();
|
||||
UserCurrentRole userCurrentRole = userCurrentRoleService.findById(authUserWithDept.getId())
|
||||
.orElseThrow(() -> new com.yunhai.platform.apistd.BizException(com.yunhai.platform.utils.exception.ErrorCode.INTERNAL_SERVER_ERROR));
|
||||
Optional<UserCurrentRole> userCurrentRoleOpt = userCurrentRoleService.findById(authUserWithDept.getId());
|
||||
if (!userCurrentRoleOpt.isPresent()) {
|
||||
return result;
|
||||
}
|
||||
UserCurrentRole userCurrentRole = userCurrentRoleOpt.get();
|
||||
Integer roleId = userCurrentRole.getRoleId();
|
||||
if (roleId == 7 || roleId == 2) roleId = 2;
|
||||
Boolean isSuperAdmin = authUserWithDept.getType() == 1;
|
||||
|
||||
Reference in New Issue
Block a user