Merge
This commit is contained in:
buisnesslogic/src/main/java/com/plannaplan/services
restservice/src
main
java
com
plannaplan
controllers
test
@ -41,4 +41,14 @@ public class GroupService {
|
||||
public Optional<Groups> getGroupById(Long id) {
|
||||
return this.repo.findById(id);
|
||||
}
|
||||
|
||||
public Optional<Long> findNotExistingGroup(List<Long> ids) {
|
||||
for (Long oneId : ids) {
|
||||
if (this.repo.existsById(oneId) == false) {
|
||||
return Optional.of(oneId);
|
||||
}
|
||||
}
|
||||
return Optional.empty();
|
||||
|
||||
}
|
||||
}
|
@ -49,4 +49,8 @@ public class UserService {
|
||||
return this.repo.searchForUsers(query, UserRoles.STUDENT);
|
||||
}
|
||||
|
||||
public Optional<User> getById(Long userId) {
|
||||
return this.repo.findById(userId);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user