|
|
@ -149,7 +149,7 @@ public class ConferenceService {
|
|
|
|
conference.setUsers(conferenceUserService.saveOrCreate(conferenceDto.getUsers()));
|
|
|
|
conference.setUsers(conferenceUserService.saveOrCreate(conferenceDto.getUsers()));
|
|
|
|
if (conferenceDto.getPaperIds() != null && !conferenceDto.getPaperIds().isEmpty()) {
|
|
|
|
if (conferenceDto.getPaperIds() != null && !conferenceDto.getPaperIds().isEmpty()) {
|
|
|
|
conferenceDto.getPaperIds().forEach(paperId ->
|
|
|
|
conferenceDto.getPaperIds().forEach(paperId ->
|
|
|
|
conference.getPapers().add(paperService.findEntityById(paperId)));
|
|
|
|
conference.getPapers().add(paperService.findPaperById(paperId)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return conference;
|
|
|
|
return conference;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -173,4 +173,10 @@ public class ConferenceService {
|
|
|
|
public List<Conference> findAllActive() {
|
|
|
|
public List<Conference> findAllActive() {
|
|
|
|
return conferenceRepository.findAllActive(new Date());
|
|
|
|
return conferenceRepository.findAllActive(new Date());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void addPaper(ConferenceDto conferenceDto) {
|
|
|
|
|
|
|
|
Paper paper = new Paper();
|
|
|
|
|
|
|
|
paper.setTitle(userService.getCurrentUser().getLastName() + "_" + conferenceDto.getTitle());
|
|
|
|
|
|
|
|
conferenceDto.getPapers().add(paper);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|