From d37c9bda57ff86194e0055813e0573e342905a0b Mon Sep 17 00:00:00 2001 From: Nightblade73 Date: Wed, 24 Apr 2019 10:17:32 +0400 Subject: [PATCH] #64 excluded adding articles with the same name --- .../java/ru/ulstu/conference/service/ConferenceService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ru/ulstu/conference/service/ConferenceService.java b/src/main/java/ru/ulstu/conference/service/ConferenceService.java index 1346894..e6338fb 100644 --- a/src/main/java/ru/ulstu/conference/service/ConferenceService.java +++ b/src/main/java/ru/ulstu/conference/service/ConferenceService.java @@ -113,7 +113,7 @@ public class ConferenceService { public void addPaper(ConferenceDto conferenceDto) { Paper paper = new Paper(); - paper.setTitle(userService.getCurrentUser().getLastName() + "_" + conferenceDto.getTitle()); + paper.setTitle(userService.getCurrentUser().getLastName() + "_" + conferenceDto.getTitle() + "_" + (new Date()).getTime()); paper.setStatus(Paper.PaperStatus.DRAFT); conferenceDto.getPapers().add(paper);