added addview and download PDF
This commit is contained in:
@ -2,6 +2,7 @@ package ovh.herisson.Clyde.Services.ScientificPublications;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ovh.herisson.Clyde.DTO.ScientificPublications.ResearchDTO;
|
||||
import ovh.herisson.Clyde.Repositories.ScientificPublications.ResearchCoAuthorsRepository;
|
||||
import ovh.herisson.Clyde.Repositories.ScientificPublications.ResearchRepository;
|
||||
import ovh.herisson.Clyde.Repositories.ScientificPublications.ResearcherRepository;
|
||||
@ -186,4 +187,13 @@ public class ResearchesService {
|
||||
}
|
||||
researcherRepo.save(researcher);
|
||||
}
|
||||
|
||||
public Research getResearchByUrl(String url) {
|
||||
return articleRepo.findByPdfLocation(url);
|
||||
}
|
||||
|
||||
public Research addView(Research research) {
|
||||
research.setViews(research.getViews()+1);
|
||||
articleRepo.save(research);
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,6 @@ public class StatisticsService {
|
||||
toReturn.add(statsRepo.languageByYears());
|
||||
toReturn.add(statsRepo.languageByMonths());
|
||||
toReturn.add(statsRepo.languageByTopics());
|
||||
|
||||
return toReturn;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user