From 22d837e29f6db1d88331844ed05abc801c6f1364 Mon Sep 17 00:00:00 2001 From: seungryeol Date: Thu, 8 Aug 2024 00:21:17 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20=EB=A9=94=EC=9D=B8=ED=99=94=EB=A9=B4=20?= =?UTF-8?q?=EC=B1=84=EC=86=8C=20=ED=94=84=EB=A1=9C=ED=95=84=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20+=20=EC=8A=A4=ED=85=9D=20=EA=B0=9C=EC=88=98=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/response/SelectMyVeggieProfileResponse.java | 1 + .../domain/myveggiegarden/service/MyVeggieGardenService.java | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/modernfarmer/farmusspring/domain/myveggiegarden/dto/response/SelectMyVeggieProfileResponse.java b/src/main/java/com/modernfarmer/farmusspring/domain/myveggiegarden/dto/response/SelectMyVeggieProfileResponse.java index 27149d2a..1e13043e 100644 --- a/src/main/java/com/modernfarmer/farmusspring/domain/myveggiegarden/dto/response/SelectMyVeggieProfileResponse.java +++ b/src/main/java/com/modernfarmer/farmusspring/domain/myveggiegarden/dto/response/SelectMyVeggieProfileResponse.java @@ -16,4 +16,5 @@ public class SelectMyVeggieProfileResponse { private String createdVeggie; private int period; private int step; + private int stepCount; } diff --git a/src/main/java/com/modernfarmer/farmusspring/domain/myveggiegarden/service/MyVeggieGardenService.java b/src/main/java/com/modernfarmer/farmusspring/domain/myveggiegarden/service/MyVeggieGardenService.java index 1fee0f02..3d715c21 100644 --- a/src/main/java/com/modernfarmer/farmusspring/domain/myveggiegarden/service/MyVeggieGardenService.java +++ b/src/main/java/com/modernfarmer/farmusspring/domain/myveggiegarden/service/MyVeggieGardenService.java @@ -7,6 +7,7 @@ import com.modernfarmer.farmusspring.domain.myveggiegarden.entity.MyVeggie; import com.modernfarmer.farmusspring.domain.myveggiegarden.util.DateManager; import com.modernfarmer.farmusspring.domain.user.entity.User; +import com.modernfarmer.farmusspring.domain.veggieinfo.entity.VeggieInfo; import com.modernfarmer.farmusspring.domain.veggieinfo.helper.VeggieInfoHelper; import com.modernfarmer.farmusspring.domain.veggieinfo.vo.VeggieInfoVo; import com.modernfarmer.farmusspring.global.response.BaseResponseDto; @@ -56,6 +57,7 @@ public BaseResponseDto deleteMyVeggie(DeleteMyVeggieRequest deleteMyVeggie @Transactional public BaseResponseDto selectMyVeggieProfile(Long myVeggieId) { MyVeggie myVeggie = selectMyVeggieAndFarmClub(myVeggieId); + VeggieInfo veggieInfo = veggieInfoHelper.getVeggieInfoEntity(myVeggie.getVeggieInfoId()); return BaseResponseDto.of(SuccessCode.SUCCESS, SelectMyVeggieProfileResponse.of( myVeggie.getNickname(), @@ -63,7 +65,8 @@ public BaseResponseDto selectMyVeggieProfile(Long myVeggie.getVeggieImage(), DateManager.parsingDotDate(myVeggie.getBirth()), DateManager.calculateDay(myVeggie.getBirth(), new Date()), - checkFarmClubAffiliation(myVeggie) + checkFarmClubAffiliation(myVeggie), + veggieInfo.getSteps().size() )); }