|
|
@ -222,13 +222,15 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao, |
|
|
|
if (null == roleList || roleList.size() == 0) { |
|
|
|
return new Result<List<RoleInfoResultDTO>>().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg()); |
|
|
|
} |
|
|
|
List<RoleInfoResultDTO> staffRoleList = roleList.stream().map(p -> { |
|
|
|
RoleInfoResultDTO staffRoleResultDTO = new RoleInfoResultDTO(); |
|
|
|
staffRoleResultDTO.setRoleId(p.getId()); |
|
|
|
staffRoleResultDTO.setRoleName(p.getRoleName()); |
|
|
|
staffRoleResultDTO.setFullTimeOnly(p.getFullTimeOnly()); |
|
|
|
return staffRoleResultDTO; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
List<RoleInfoResultDTO> staffRoleList = roleList.stream() |
|
|
|
.filter(p -> !RoleKeyConstants.ROLE_KEY_ROOT_MANAGER.equals(p.getRoleKey())) |
|
|
|
.map(p -> { |
|
|
|
RoleInfoResultDTO staffRoleResultDTO = new RoleInfoResultDTO(); |
|
|
|
staffRoleResultDTO.setRoleId(p.getId()); |
|
|
|
staffRoleResultDTO.setRoleName(p.getRoleName()); |
|
|
|
staffRoleResultDTO.setFullTimeOnly(p.getFullTimeOnly()); |
|
|
|
return staffRoleResultDTO; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
return new Result<List<RoleInfoResultDTO>>().ok(staffRoleList); |
|
|
|
} |
|
|
|
|
|
|
|