Resolve "Фильтр по сущности" #48

Merged
BarminaA merged 1 commits from 21--filter-by-entity into master 2021-04-12 17:11:42 +04:00
2 changed files with 0 additions and 8 deletions
Showing only changes of commit b32bad1eda - Show all commits

View File

@ -47,12 +47,6 @@ public class StatisticController {
url[i] = urlCommits.get(i)[0].toString().substring(urlCommits.get(i)[0].toString().lastIndexOf("/") + 1); url[i] = urlCommits.get(i)[0].toString().substring(urlCommits.get(i)[0].toString().lastIndexOf("/") + 1);
} }
model.addAttribute("urls", url); model.addAttribute("urls", url);
// List<Object[]> entityCommits = commitRepository.getCommitEntityStatistic().stream()
// .map(stat -> new Object[]{stat.getEntity(), stat.getCountCommit()})
// .collect(Collectors.toList());
// model.addAttribute("commitTimeData", timeCommits);
return STATISTIC; return STATISTIC;
} }
} }

View File

@ -31,6 +31,4 @@ public interface CommitRepository extends JpaRepository<Commit, Integer> {
@Query("SELECT new ru.ulstu.extractor.model.CommitTimeStatistic(cast(c.date as date), COUNT(DISTINCT c.hash)) FROM Commit c GROUP by cast(c.date as date) ORDER by cast(c.date as date)") @Query("SELECT new ru.ulstu.extractor.model.CommitTimeStatistic(cast(c.date as date), COUNT(DISTINCT c.hash)) FROM Commit c GROUP by cast(c.date as date) ORDER by cast(c.date as date)")
List<CommitTimeStatistic> getCommitTimeStatistic(); List<CommitTimeStatistic> getCommitTimeStatistic();
// @Query("SELECT new ru.ulstu.extractor.model.CommitEntityStatistic(f.containsEntity, COUNT(DISTINCT f.commit.hash)) FROM FileChange f GROUP by f.containsEntity")
// List<CommitEntityStatistic> getCommitEntityStatistic();
} }