Skip to content

Commit

Permalink
chore (#3) : 사용자 결과 저장을 위한 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
daehwan2yo committed Apr 11, 2022
1 parent 6318048 commit f78eae9
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.codingwasabi.howtodo.web.account.AccountRepository;
import com.codingwasabi.howtodo.web.account.entity.Account;
import com.codingwasabi.howtodo.web.calendar.CalendarRepository;
import com.codingwasabi.howtodo.web.calendar.entity.Calendar;
Expand All @@ -26,6 +27,7 @@ public class CalendarServiceImpl implements CalendarService {
private final ExamRepository examRepository;
private final DailyPlanRepository dailyPlanRepository;
private final PlanMakingPolicy planMakingPolicy;
private final AccountRepository accountRepository;

@Override
@Transactional
Expand All @@ -40,6 +42,8 @@ public Calendar create(Account account, int tendency, String nickname, int daily
account.setDailyQuota(dailyQuota);
account.setNickname(nickname);
account.setTendency(tendency);

accountRepository.save(account);
dailyPlanRepository.saveAll(dailyPlans);
examRepository.saveAll(exams);
calendarRepository.save(calendar);
Expand Down

0 comments on commit f78eae9

Please sign in to comment.