This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
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 java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
@@ -45,8 +49,19 @@ public class TournamentDivideService {
|
||||
|
||||
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);
|
||||
|
||||
// try {
|
||||
// log.info(mapper.writeValueAsString(tournament));
|
||||
// } catch (JsonProcessingException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
return tournament;
|
||||
}
|
||||
|
||||
@@ -63,6 +78,7 @@ public class TournamentDivideService {
|
||||
|
||||
if (registrations.size() <= 16) {
|
||||
var group = getGroup(registrations, event.getType());
|
||||
log.info("Groepgrootte: " + group.getTeams().size());
|
||||
group.setEvent(event);
|
||||
event.getGroups().add(group);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user