diff --git a/dodam-api/src/main/java/b1nd/dodamapi/point/usecase/PointUseCase.java b/dodam-api/src/main/java/b1nd/dodamapi/point/usecase/PointUseCase.java index 76108d54..d9283a67 100644 --- a/dodam-api/src/main/java/b1nd/dodamapi/point/usecase/PointUseCase.java +++ b/dodam-api/src/main/java/b1nd/dodamapi/point/usecase/PointUseCase.java @@ -58,8 +58,9 @@ private void savePoints(List students, PointReason reason, LocalDate is } private void saveScores(List students, PointReason reason) { - pointService.getScoresBy(students).parallelStream() - .map(s -> s.issue(reason)); + pointService.getScoresBy(students).forEach( + s -> s.issue(reason) + ); } private void publishPointIssuedEvents(List students, PointReason reason) { diff --git a/dodam-core/src/main/java/b1nd/dodamcore/point/domain/entity/PointScore.java b/dodam-core/src/main/java/b1nd/dodamcore/point/domain/entity/PointScore.java index 96dc9722..708380db 100644 --- a/dodam-core/src/main/java/b1nd/dodamcore/point/domain/entity/PointScore.java +++ b/dodam-core/src/main/java/b1nd/dodamcore/point/domain/entity/PointScore.java @@ -43,12 +43,11 @@ public PointScore(Student student) { this.student = student; } - public boolean issue(PointReason reason) { + public void issue(PointReason reason) { switch (reason.getPointType()) { case DORMITORY -> dormitoryScore.issue(reason.getScoreType(), reason.getScore()); case SCHOOL -> schoolScore.issue(reason.getScoreType(), reason.getScore()); } - return true; } public void cancel(PointReason reason) {