From 33cea5ea53ad0d8984430b064a8145c7c2263dfe Mon Sep 17 00:00:00 2001 From: yubin-im Date: Wed, 5 Jun 2024 13:44:51 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=A0=84=EC=B2=B4=20=EA=B3=84=EC=A2=8C?= =?UTF-8?q?=20=EC=A1=B0=ED=9A=8C=EC=8B=9C=20=EA=B3=84=EC=A2=8C=20=EC=9E=94?= =?UTF-8?q?=EC=95=A1=20=ED=95=A8=EA=BB=98=20return=EB=90=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../triptogether/account/dto/response/AccountsResDto.java | 3 +++ .../triptogether/account/service/impl/AccountServiceImpl.java | 1 + src/test/java/com/hanaro/triptogether/AccountServiceTests.java | 2 ++ 3 files changed, 6 insertions(+) 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()); } }