Resolve "Ping конференции в списке конференций" #196

Merged
VladimirZarayskiy merged 44 commits from 68-ping-conf into dev 2019-04-25 14:00:36 +04:00
2 changed files with 9 additions and 6 deletions
Showing only changes of commit c18ecea13b - Show all commits

View File

@ -83,12 +83,7 @@ public class GrantController {
@PostMapping(value = "/grant", params = "attachPaper")
public String attachPaper(GrantDto grantDto) {
if (!grantDto.getPaperIds().isEmpty()) {
grantDto.getPapers().clear();
grantDto.setPapers(grantService.getGrantPapers(grantDto.getPaperIds()));
} else {
grantDto.getPapers().clear();
}
grantService.attachPaper(grantDto);
return GRANT_PAGE;
}

View File

@ -176,4 +176,12 @@ public class GrantService {
return paperService.findAll();
}
public void attachPaper(GrantDto grantDto) {
if (!grantDto.getPaperIds().isEmpty()) {
grantDto.getPapers().clear();
grantDto.setPapers(getGrantPapers(grantDto.getPaperIds()));
} else {
grantDto.getPapers().clear();
}
}
}