merge-requests/13/head
Alyona 6 years ago
parent b3f8b334ef
commit 5af8cb1bd3

@ -67,6 +67,9 @@ public class PaperService {
@Transactional
public Integer update(PaperDto paperDto) throws IOException {
Paper paper = paperRepository.findOne(paperDto.getId());
if(paper != null && paper.getStatus() != paperDto.getStatus()){
sendMessageAboutStatusChange(paper.getStatus(),paperDto);
}
if (paperDto.getTmpFileName() != null && paper.getFileData() != null) {
fileService.deleteFile(paper.getFileData());
}

Loading…
Cancel
Save