@ -45,7 +45,7 @@ public class APIController {
|
||||
@GetMapping("/getGroupIdsOfUser/{teilnehmer}")
|
||||
@Secured("ROLE_api_user")
|
||||
@ApiOperation("Gibt alle Gruppen zurück in denen sich ein Teilnehmer befindet")
|
||||
public List<Long> getGroupsOfUser(@ApiParam("Teilnehmer dessen groupIds zurückgegeben werden sollen") @PathVariable String teilnehmer) throws EventException {
|
||||
public List<Long> getGroupsOfUser(@ApiParam("Teilnehmer dessen groupIds zurückgegeben werden sollen") @PathVariable String teilnehmer) {
|
||||
return eventService.getGroupsOfUser(teilnehmer);
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ public class APIController {
|
||||
public Group getGroupFromId(@ApiParam("GruppenId der gefordeten Gruppe") @PathVariable Long groupId) throws EventException {
|
||||
List<Event> eventList = eventService.getEventsOfGroup(groupId);
|
||||
List<Group> groups = groupService.projectEventList(eventList);
|
||||
|
||||
|
||||
return groups.get(0);
|
||||
}
|
||||
|
||||
|
||||
@ -10,7 +10,6 @@ import mops.gruppen2.domain.exception.EventException;
|
||||
|
||||
|
||||
@JsonTypeInfo(
|
||||
include = JsonTypeInfo.As.PROPERTY,
|
||||
use = JsonTypeInfo.Id.NAME,
|
||||
property = "type"
|
||||
)
|
||||
|
||||
@ -24,14 +24,14 @@ public interface EventRepository extends CrudRepository<EventDTO, Long> {
|
||||
List<Long> findGroup_idsWhereVisibility(@Param("vis") Boolean visibility);
|
||||
|
||||
@Query("SELECT DISTINCT group_id FROM event WHERE event_id > :status")
|
||||
public List<Long> findNewEventSinceStatus(@Param("status") Long status);
|
||||
List<Long> findNewEventSinceStatus(@Param("status") Long status);
|
||||
|
||||
@Query("SELECT * FROM event WHERE group_id IN (:groupIds) ")
|
||||
public List<EventDTO> findAllEventsOfGroups(@Param("groupIds") List<Long> groupIds);
|
||||
List<EventDTO> findAllEventsOfGroups(@Param("groupIds") List<Long> groupIds);
|
||||
|
||||
@Query("SELECT MAX(event_id) FROM event")
|
||||
public Long getHighesEvent_ID();
|
||||
Long getHighesEvent_ID();
|
||||
|
||||
@Query("SELECT MAX(group_id) FROM event")
|
||||
public Long getMaxGroupID();
|
||||
Long getMaxGroupID();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user