This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
package nl.connectedit.swiss.service;
|
package nl.connectedit.swiss.service;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.fasterxml.jackson.datatype.jsr310.JSR310Module;
|
||||||
|
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||||
import jakarta.transaction.Transactional;
|
import jakarta.transaction.Transactional;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
@@ -45,8 +49,19 @@ public class TournamentDivideService {
|
|||||||
|
|
||||||
tournament.setStatus(TournamentStatus.DIVIDED);
|
tournament.setStatus(TournamentStatus.DIVIDED);
|
||||||
|
|
||||||
|
// var mapper = new ObjectMapper();
|
||||||
|
// mapper.registerModule(new JavaTimeModule());
|
||||||
|
// try {
|
||||||
|
// log.info(mapper.writeValueAsString(tournament));
|
||||||
|
// } catch (JsonProcessingException e) {
|
||||||
|
// throw new RuntimeException(e);
|
||||||
|
// }
|
||||||
tournamentRepository.save(tournament);
|
tournamentRepository.save(tournament);
|
||||||
|
// try {
|
||||||
|
// log.info(mapper.writeValueAsString(tournament));
|
||||||
|
// } catch (JsonProcessingException e) {
|
||||||
|
// throw new RuntimeException(e);
|
||||||
|
// }
|
||||||
return tournament;
|
return tournament;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,6 +78,7 @@ public class TournamentDivideService {
|
|||||||
|
|
||||||
if (registrations.size() <= 16) {
|
if (registrations.size() <= 16) {
|
||||||
var group = getGroup(registrations, event.getType());
|
var group = getGroup(registrations, event.getType());
|
||||||
|
log.info("Groepgrootte: " + group.getTeams().size());
|
||||||
group.setEvent(event);
|
group.setEvent(event);
|
||||||
event.getGroups().add(group);
|
event.getGroups().add(group);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user