提交修改

This commit is contained in:
quyixiao 2020-12-16 16:15:44 +08:00
parent ddc7cbaab8
commit d43657e685

View File

@ -520,12 +520,15 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
if (CollectionUtils.isNotEmpty(commonStaffList)) { if (CollectionUtils.isNotEmpty(commonStaffList)) {
staffMenus.addAll(commonStaffList); staffMenus.addAll(commonStaffList);
} }
//如果是部门领导
boolean flag = false;
DepartmentsStaffRelateEntity departmentsStaffRelateEntity = departmentsStaffRelateService.selectLastDepartmentByStaffId(userId); DepartmentsStaffRelateEntity departmentsStaffRelateEntity = departmentsStaffRelateService.selectLastDepartmentByStaffId(userId);
if (departmentsStaffRelateEntity != null && new Integer(1).equals(departmentsStaffRelateEntity.getIsLeader())) { if (departmentsStaffRelateEntity != null && new Integer(1).equals(departmentsStaffRelateEntity.getIsLeader())) {
List<StaffMenu> staffMenuDepartmentList = staffMenuService.selectByParentId(RoleMenuEnums.DEPARTMENT_PM.getType()); List<StaffMenu> staffMenuDepartmentList = staffMenuService.selectByParentId(RoleMenuEnums.DEPARTMENT_PM.getType());
if (CollectionUtils.isNotEmpty(staffMenuDepartmentList)) { if (CollectionUtils.isNotEmpty(staffMenuDepartmentList)) {
staffMenus.addAll(staffMenuDepartmentList); staffMenus.addAll(staffMenuDepartmentList);
} }
flag = true;
} }
if (CollectionUtils.isNotEmpty(staffRoleList)) { if (CollectionUtils.isNotEmpty(staffRoleList)) {
@ -542,6 +545,7 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
} }
} }
} }
flag =true;
} }
if (CollectionUtils.isNotEmpty(staffMenus) && staffMenus.size() > 0) { if (CollectionUtils.isNotEmpty(staffMenus) && staffMenus.size() > 0) {
List<Long> authIds = new ArrayList<>(); List<Long> authIds = new ArrayList<>();
@ -553,6 +557,9 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
map = recordAuthService.selectAuthByIds(authIds); map = recordAuthService.selectAuthByIds(authIds);
} }
} }
if(flag){
map.put("toFast",1);
}
return map; return map;
} }