From f7632219c490fa51bb11c37f550c93d1a479c7fb Mon Sep 17 00:00:00 2001 From: MinchoGreenT Date: Wed, 3 Jul 2024 09:47:48 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20=EB=82=B4=20=ED=8C=9C=ED=81=B4=EB=9F=BD?= =?UTF-8?q?=20=EC=A1=B0=ED=9A=8C=20=EC=8B=9C=20=ED=99=9C=EB=8F=99=EC=9D=BC?= =?UTF-8?q?=EC=88=98=20=EC=9D=B4=EC=83=81=ED=95=9C=EA=B1=B0=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/farmclub/dto/res/GetMyFarmClubResponseDto.java | 2 +- .../farmusspring/domain/farmclub/vo/GetMyFarmClubVo.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/modernfarmer/farmusspring/domain/farmclub/dto/res/GetMyFarmClubResponseDto.java b/src/main/java/com/modernfarmer/farmusspring/domain/farmclub/dto/res/GetMyFarmClubResponseDto.java index 7a222800..cf31e153 100644 --- a/src/main/java/com/modernfarmer/farmusspring/domain/farmclub/dto/res/GetMyFarmClubResponseDto.java +++ b/src/main/java/com/modernfarmer/farmusspring/domain/farmclub/dto/res/GetMyFarmClubResponseDto.java @@ -15,7 +15,7 @@ public record GetMyFarmClubResponseDto( Long wholeMemberCount, List steps, String advice, - int daysSinceStart + Long daysSinceStart ) { public static GetMyFarmClubResponseDto of(GetMyFarmClubVo farmClubInfo, List steps, String advice) { diff --git a/src/main/java/com/modernfarmer/farmusspring/domain/farmclub/vo/GetMyFarmClubVo.java b/src/main/java/com/modernfarmer/farmusspring/domain/farmclub/vo/GetMyFarmClubVo.java index 66960845..fee9fa37 100644 --- a/src/main/java/com/modernfarmer/farmusspring/domain/farmclub/vo/GetMyFarmClubVo.java +++ b/src/main/java/com/modernfarmer/farmusspring/domain/farmclub/vo/GetMyFarmClubVo.java @@ -5,6 +5,7 @@ import java.time.LocalDate; import java.time.LocalDateTime; +import java.time.temporal.ChronoUnit; public record GetMyFarmClubVo( @@ -12,7 +13,7 @@ public record GetMyFarmClubVo( String farmClubImage, String veggieInfoId, Long wholeMemberCount, - Integer daySinceStart + Long daySinceStart ) { public static GetMyFarmClubVo of(BaseInfo baseInfo, Long wholeMemberCount, LocalDate dayRegister) { return new GetMyFarmClubVo( @@ -20,7 +21,7 @@ public static GetMyFarmClubVo of(BaseInfo baseInfo, Long wholeMemberCount, Local baseInfo.farmClubImage(), baseInfo.veggieInfoId(), wholeMemberCount, - LocalDate.now().compareTo(dayRegister) + ChronoUnit.DAYS.between(dayRegister, LocalDate.now()) ); }