Skip to content

Commit 8e323f4

Browse files
committed
[fix] 문항 통계 업데이트 전 flush
1 parent c849413 commit 8e323f4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/com/moplus/moplus_server/domain/problem/domain/problem/ProblemAdminIdService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class ProblemAdminIdService {
1616
/*
1717
문제 ID 생성 로직
1818
C : 문제 타입 ( 1: 기출문제, 2: 변형문제, 3: 창작문제 )
19-
S : ( 1: 고1, 2: 고2, 3: 미적분, 4: 기하, 5: 확률과 통계, 6: 가형, 7: 나형 )
19+
S : ( 1: 고1, 2: 고2, 3: 미적분, 4: 기하, 5: 확률과 통계, 6: 고3_공통 )
2020
YY: 년도 (두 자리)
2121
MM: 월 (두 자리)
2222
NN : 번호 (01~99)

src/main/java/com/moplus/moplus_server/statistic/Problem/service/CountStatisticsUpdateService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ public void updateStatistics(Long statisticId, StatisticFieldType type, Statisti
2929
@Transactional
3030
public void createStatistics(Long statisticId, StatisticEntityTarget target) {
3131
switch (target) {
32-
case PROBLEM -> problemStatisticRepository.save(new ProblemStatistic(statisticId));
33-
case PROBLEM_SET -> problemSetStatisticRepository.save(new ProblemSetStatistic(statisticId));
34-
case CHILD_PROBLEM -> childProblemStatisticRepository.save(new ChildProblemStatistic(statisticId));
32+
case PROBLEM -> problemStatisticRepository.saveAndFlush(new ProblemStatistic(statisticId));
33+
case PROBLEM_SET -> problemSetStatisticRepository.saveAndFlush(new ProblemSetStatistic(statisticId));
34+
case CHILD_PROBLEM -> childProblemStatisticRepository.saveAndFlush(new ChildProblemStatistic(statisticId));
3535
}
3636
}
3737

0 commit comments

Comments
 (0)