Functionality done

This commit is contained in:
BuildTools committed 2020-10-29 16:25:55 +01:00
1 parent d3a2256334
commit 3a3e6dc427
4 files changed
+35 -4

No files matched your search

@@ -41,4 +41,15 @@ public class GroupService {
public Optional<Groups> getGroupById(Long id) {
return this.repo.findById(id);
}
public Long findNotExistingGroup(List<Long> ids) {
Long response = Long.MIN_VALUE;
for (Long oneId : ids) {
if (this.repo.existsById(oneId) == false) {
response = oneId;
}
}
return response;
}
}
@@ -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);
}
}