From aeb2d7f93233e293f8894db95d78f0716777e7b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=ED=95=9C=EC=96=BC?= Date: Fri, 9 Aug 2024 10:17:36 +0900 Subject: [PATCH] Revert "Merge branch 'Be/Report' into 'backend'" This reverts merge request !126 --- .../edufocus/report/repository/ReportRepository.java | 7 +++++-- .../edufocus/report/repository/ReportSetRepository.java | 2 +- .../edufocus/report/service/ReportServiceImpl.java | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/com/edufocus/edufocus/report/repository/ReportRepository.java b/backend/src/main/java/com/edufocus/edufocus/report/repository/ReportRepository.java index 7b1e1ac..7665f28 100644 --- a/backend/src/main/java/com/edufocus/edufocus/report/repository/ReportRepository.java +++ b/backend/src/main/java/com/edufocus/edufocus/report/repository/ReportRepository.java @@ -9,10 +9,13 @@ import java.util.UUID; @Repository public interface ReportRepository extends JpaRepository { + List findByUserId(long userId); + + List findByLectureId(long lectureId); Report findByReportSetIdAndUserId(UUID reportSetId, long userId); - List findByReportSetIdDesc(UUID reportSetId); + List findByReportSetId(UUID reportSetId); - List findByLectureIdAndUserIdDesc(long lectureId, long userId); + List findByLectureIdAndUserId(long lectureId, long userId); } diff --git a/backend/src/main/java/com/edufocus/edufocus/report/repository/ReportSetRepository.java b/backend/src/main/java/com/edufocus/edufocus/report/repository/ReportSetRepository.java index f4f37fb..f1b484c 100644 --- a/backend/src/main/java/com/edufocus/edufocus/report/repository/ReportSetRepository.java +++ b/backend/src/main/java/com/edufocus/edufocus/report/repository/ReportSetRepository.java @@ -9,5 +9,5 @@ import java.util.UUID; @Repository public interface ReportSetRepository extends JpaRepository { - List findByLectureIdDesc(long userId); + List findByLectureId(long userId); } diff --git a/backend/src/main/java/com/edufocus/edufocus/report/service/ReportServiceImpl.java b/backend/src/main/java/com/edufocus/edufocus/report/service/ReportServiceImpl.java index 1b80593..33d0a71 100644 --- a/backend/src/main/java/com/edufocus/edufocus/report/service/ReportServiceImpl.java +++ b/backend/src/main/java/com/edufocus/edufocus/report/service/ReportServiceImpl.java @@ -125,7 +125,7 @@ public class ReportServiceImpl implements ReportService { @Override public List findReportSets(long lectureId) { - List reportSets = reportSetRepository.findByLectureIdDesc(lectureId); + List reportSets = reportSetRepository.findByLectureId(lectureId); return reportSets.stream() .map(ReportSet::makeReportSetResponse) @@ -134,7 +134,7 @@ public class ReportServiceImpl implements ReportService { @Override public List findReports(UUID reportSetId) { - List reports = reportRepository.findByReportSetIdDesc(reportSetId); + List reports = reportRepository.findByReportSetId(reportSetId); return reports.stream() .map(Report::makeReportResponse) @@ -143,7 +143,7 @@ public class ReportServiceImpl implements ReportService { @Override public List findReports(long lectureId, long userId) { - List reports = reportRepository.findByLectureIdAndUserIdDesc(lectureId, userId); + List reports = reportRepository.findByLectureIdAndUserId(lectureId, userId); return reports.stream() .map(Report::makeReportResponse)