1

add 2 new Queries and 2 Methods for UserService

This commit is contained in:
killerber4t
2020-03-12 13:55:10 +01:00
parent f8237853a8
commit a775040abe
4 changed files with 51 additions and 8 deletions

View File

@ -0,0 +1,25 @@
package mops.gruppen2.service;
import mops.gruppen2.domain.EventDTO;
import mops.gruppen2.repository.EventRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Optional;
@Service
public class UserService {
final EventRepository eventRepository;
public UserService(EventRepository eventRepository) {
this.eventRepository = eventRepository;
}
public List<Long> getUserGroups(Long user_id) {
List<Long> group_ids = eventRepository.findGroup_idsWhereUser_id(user_id);
return null;
}
}