Skip to content

Commit 88eef5d

Browse files
authored
Merge pull request #262 from FunD-StockProject/fix/experiment-report-user-scope
Fix: experiment report user-scoped aggregation
2 parents 3af89b1 + eeb2e53 commit 88eef5d

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/main/java/com/fund/stockProject/experiment/service/ExperimentService.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -632,9 +632,9 @@ public ExperimentReportResponse getReport(CustomUserDetails customUserDetails) {
632632
.toLocalDate()
633633
.atTime(LocalTime.MAX);
634634

635-
// 이번주 진행 실험 횟수
636-
final int weeklyExperimentCount = experimentRepository.countExperimentsForWeek(
637-
startOfWeek, endOfWeek);
635+
// 이번주 진행 실험 횟수 (사용자 기준)
636+
final int weeklyExperimentCount = experimentRepository.countExperimentsForWeekByUser(
637+
email, startOfWeek, endOfWeek);
638638

639639
// 특정 사용자가 진행한 총 실험
640640
final List<Experiment> experimentsByEmailAndStatus = experimentRepository.findExperimentsByEmailAndStatus(
@@ -675,8 +675,8 @@ public ExperimentReportResponse getReport(CustomUserDetails customUserDetails) {
675675

676676
final List<ReportPatternDto> reportPatternDtos = new ArrayList<>();
677677

678-
// 인간지표 점수 별 투자 유형 패턴 데이터
679-
final List<Object[]> experimentGroupByBuyAt = experimentRepository.findExperimentGroupByBuyAt();
678+
// 인간지표 점수 별 투자 유형 패턴 데이터 (사용자 기준)
679+
final List<Object[]> experimentGroupByBuyAt = experimentRepository.findExperimentGroupByBuyAtByUser(email);
680680

681681
for (final Object[] row : experimentGroupByBuyAt) {
682682
// Object[]에서 데이터 추출: [buy_date, avg_roi, avg_score]

0 commit comments

Comments
 (0)