temporarily disable tests + rough change from groupid to uuid + remove invitelink old system
This commit is contained in:
@ -12,6 +12,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@ -32,10 +33,10 @@ public class GroupService {
|
||||
* @param groupIds Liste an IDs
|
||||
* @return Liste an Events
|
||||
*/
|
||||
public List<Event> getGroupEvents(List<Long> groupIds) {
|
||||
public List<Event> getGroupEvents(List<UUID> groupIds) {
|
||||
List<EventDTO> eventDTOS = new ArrayList<>();
|
||||
for (Long groupId : groupIds) {
|
||||
eventDTOS.addAll(eventRepository.findEventDTOByGroup_id(groupId));
|
||||
for (UUID groupId : groupIds) {
|
||||
eventDTOS.addAll(eventRepository.findEventDTOByGroup_id(groupId.toString()));
|
||||
}
|
||||
return eventService.translateEventDTOs(eventDTOS);
|
||||
}
|
||||
@ -49,7 +50,7 @@ public class GroupService {
|
||||
* @throws EventException Projektionsfehler
|
||||
*/
|
||||
public List<Group> projectEventList(List<Event> events) throws EventException {
|
||||
Map<Long, Group> groupMap = new HashMap<>();
|
||||
Map<UUID, Group> groupMap = new HashMap<>();
|
||||
|
||||
events.parallelStream()
|
||||
.forEachOrdered(event -> event.apply(getOrCreateGroup(groupMap, event.getGroupId())));
|
||||
@ -57,7 +58,7 @@ public class GroupService {
|
||||
return new ArrayList<>(groupMap.values());
|
||||
}
|
||||
|
||||
private Group getOrCreateGroup(Map<Long, Group> groups, long groupId) {
|
||||
private Group getOrCreateGroup(Map<UUID, Group> groups, UUID groupId) {
|
||||
if (!groups.containsKey(groupId)) {
|
||||
groups.put(groupId, new Group());
|
||||
}
|
||||
@ -79,7 +80,7 @@ public class GroupService {
|
||||
createEvents.addAll(eventService.translateEventDTOs(eventRepository.findAllEventsByType("DeleteGroupEvent")));
|
||||
List<Group> visibleGroups = projectEventList(createEvents);
|
||||
|
||||
List<Long> userGroupIds = eventRepository.findGroup_idsWhereUser_id(userId);
|
||||
List<UUID> userGroupIds = eventService.findGroupIdsByUser(userId);
|
||||
|
||||
return visibleGroups.parallelStream()
|
||||
.filter(group -> group.getType() != null)
|
||||
|
||||
Reference in New Issue
Block a user