diff --git a/src/main/java/com/hanaro/triptogether/account/dto/response/AccountsResDto.java b/src/main/java/com/hanaro/triptogether/account/dto/response/AccountsResDto.java index 29d0ea7..ed13efa 100644 --- a/src/main/java/com/hanaro/triptogether/account/dto/response/AccountsResDto.java +++ b/src/main/java/com/hanaro/triptogether/account/dto/response/AccountsResDto.java @@ -3,10 +3,13 @@ import lombok.Builder; import lombok.Getter; +import java.math.BigDecimal; + @Getter @Builder public class AccountsResDto { private Long accIdx; private String accNumber; private String accName; + private BigDecimal accBalance; } diff --git a/src/main/java/com/hanaro/triptogether/account/service/impl/AccountServiceImpl.java b/src/main/java/com/hanaro/triptogether/account/service/impl/AccountServiceImpl.java index 7c2cb38..23fac2e 100644 --- a/src/main/java/com/hanaro/triptogether/account/service/impl/AccountServiceImpl.java +++ b/src/main/java/com/hanaro/triptogether/account/service/impl/AccountServiceImpl.java @@ -75,6 +75,7 @@ public List accounts(Long memberIdx) { .accIdx(accounts.get(i).getAccIdx()) .accNumber(accounts.get(i).getAccNumber()) .accName(accounts.get(i).getAccName()) + .accBalance(accounts.get(i).getAccBalance()) .build(); accountsResDtos.add(accountsResDto); diff --git a/src/test/java/com/hanaro/triptogether/AccountServiceTests.java b/src/test/java/com/hanaro/triptogether/AccountServiceTests.java index 636a946..1f04216 100644 --- a/src/test/java/com/hanaro/triptogether/AccountServiceTests.java +++ b/src/test/java/com/hanaro/triptogether/AccountServiceTests.java @@ -171,10 +171,12 @@ void testAccounts() { assertEquals(account1.getAccIdx(), dto1.getAccIdx()); assertEquals(account1.getAccNumber(), dto1.getAccNumber()); assertEquals(account1.getAccName(), dto1.getAccName()); + assertEquals(account1.getAccBalance(), dto1.getAccBalance()); AccountsResDto dto2 = result.get(1); assertEquals(account2.getAccIdx(), dto2.getAccIdx()); assertEquals(account2.getAccNumber(), dto2.getAccNumber()); assertEquals(account2.getAccName(), dto2.getAccName()); + assertEquals(account2.getAccBalance(), dto2.getAccBalance()); } }