Skip to content

Commit

Permalink
feat : 인슈보딩 입력 API 수정
Browse files Browse the repository at this point in the history
기존의 인슈보딩을 초기화하고 전체 재입력 받도록 변경
  • Loading branch information
1000kkannoo committed Aug 17, 2024
1 parent 2c2ab15 commit dc05b76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ public interface AccountInsuranceRepository extends JpaRepository<AccountInsuran
Optional<AccountInsurance> findByAccountAndInsuranceType(Account account, InsuranceType insuranceType);

List<AccountInsurance> findByAccount(Account account);

void deleteByAccount(Account account);
}
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ private static int calculateAge(AccountRequest.Age request) {
public Void updateInsureBoarding(final Long accountId, final AccountRequest.InsureBoarding request) {
accountServiceValidator.validateEmptyGender(request);
Account account = updateGender(accountId, request);

accountInsuranceRepository.deleteByAccount(account);

saveInsureBoard(request, account);
return null;
}
Expand Down

0 comments on commit dc05b76

Please sign in to comment.