From 1cbf0f2ddd9d7e7d602dc47427250c797449f485 Mon Sep 17 00:00:00 2001 From: seungryeol Date: Tue, 20 Aug 2024 00:46:08 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[fix]=20=EC=9D=BC=EA=B8=B0=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20=EC=8B=9C=20=ED=83=80=EC=9E=85=20isOpen=20=ED=83=80?= =?UTF-8?q?=EC=9E=85=20boolean=20->=20Boolean=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../myveggiegarden/controller/MyVeggieDiaryController.java | 2 +- .../myveggiegarden/dto/request/MyVeggieDiaryInsert.java | 2 +- .../domain/myveggiegarden/service/MyVeggieDiaryService.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/modernfarmer/farmusspring/domain/myveggiegarden/controller/MyVeggieDiaryController.java b/src/main/java/com/modernfarmer/farmusspring/domain/myveggiegarden/controller/MyVeggieDiaryController.java index 5b4f441e..e1005740 100644 --- a/src/main/java/com/modernfarmer/farmusspring/domain/myveggiegarden/controller/MyVeggieDiaryController.java +++ b/src/main/java/com/modernfarmer/farmusspring/domain/myveggiegarden/controller/MyVeggieDiaryController.java @@ -38,7 +38,7 @@ public BaseResponseDto settingMyVeggieDiary( return myVeggieDiaryService.settingMyVeggieDiary( multipartFile, myVeggieDiaryInsert.getContent(), - myVeggieDiaryInsert.isOpen(), + myVeggieDiaryInsert.getIsOpen(), myVeggieDiaryInsert.getState(), myVeggieDiaryInsert.getMyVeggieId() ); diff --git a/src/main/java/com/modernfarmer/farmusspring/domain/myveggiegarden/dto/request/MyVeggieDiaryInsert.java b/src/main/java/com/modernfarmer/farmusspring/domain/myveggiegarden/dto/request/MyVeggieDiaryInsert.java index 0bea6d7a..b21007ea 100644 --- a/src/main/java/com/modernfarmer/farmusspring/domain/myveggiegarden/dto/request/MyVeggieDiaryInsert.java +++ b/src/main/java/com/modernfarmer/farmusspring/domain/myveggiegarden/dto/request/MyVeggieDiaryInsert.java @@ -13,7 +13,7 @@ public class MyVeggieDiaryInsert { @NotNull(message = "null 값을 가지면 안됩니다.") String content; - boolean isOpen; + Boolean isOpen; @NotNull(message = "null 값을 가지면 안됩니다.") String state; @NotNull(message = "null 값을 가지면 안됩니다.") diff --git a/src/main/java/com/modernfarmer/farmusspring/domain/myveggiegarden/service/MyVeggieDiaryService.java b/src/main/java/com/modernfarmer/farmusspring/domain/myveggiegarden/service/MyVeggieDiaryService.java index aef0ee00..8cc3c5e3 100644 --- a/src/main/java/com/modernfarmer/farmusspring/domain/myveggiegarden/service/MyVeggieDiaryService.java +++ b/src/main/java/com/modernfarmer/farmusspring/domain/myveggiegarden/service/MyVeggieDiaryService.java @@ -49,7 +49,7 @@ public class MyVeggieDiaryService { public BaseResponseDto settingMyVeggieDiary( MultipartFile multipartFile, String content, - boolean isOpen, + Boolean isOpen, String state, Long myVeggieId ) throws IOException { @@ -221,7 +221,7 @@ public void validateDiaryComment(Optional diaryComment){ } private void addMyyVeggieDiary( String content, - boolean isOpen, + Boolean isOpen, String image, String state, Long myVeggieId From 74a499de52c98d8a3627bc7e5718e5f71df114c6 Mon Sep 17 00:00:00 2001 From: seungryeol Date: Tue, 20 Aug 2024 00:56:36 +0900 Subject: [PATCH 2/3] =?UTF-8?q?[fix]=20=EC=9C=A0=EC=A0=80=20=ED=94=84?= =?UTF-8?q?=EB=A1=9C=ED=95=84=20=EC=84=A4=EC=A0=95=20=EC=8B=9C=20@RequestP?= =?UTF-8?q?art=20=EC=98=A4=EB=B8=8C=EC=A0=9D=ED=8A=B8=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/user/controller/UserController.java | 5 +++-- .../domain/user/dto/request/UserNickname.java | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/modernfarmer/farmusspring/domain/user/dto/request/UserNickname.java diff --git a/src/main/java/com/modernfarmer/farmusspring/domain/user/controller/UserController.java b/src/main/java/com/modernfarmer/farmusspring/domain/user/controller/UserController.java index f83cde17..16a297fe 100644 --- a/src/main/java/com/modernfarmer/farmusspring/domain/user/controller/UserController.java +++ b/src/main/java/com/modernfarmer/farmusspring/domain/user/controller/UserController.java @@ -2,6 +2,7 @@ import com.modernfarmer.farmusspring.domain.auth.entity.CustomUser; import com.modernfarmer.farmusspring.domain.user.dto.request.AlarmUpdate; +import com.modernfarmer.farmusspring.domain.user.dto.request.UserNickname; import com.modernfarmer.farmusspring.domain.user.dto.request.UserNicknameDto; import com.modernfarmer.farmusspring.domain.user.dto.response.AlarmStatus; import com.modernfarmer.farmusspring.domain.user.dto.response.UserProfileResponse; @@ -58,10 +59,10 @@ public BaseResponseDto bringNotification(@AuthenticationPrincipal CustomUser @PostMapping(value = "/profile", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) public BaseResponseDto settingProfile( @AuthenticationPrincipal CustomUser user, - @RequestPart String nickname, + @RequestPart UserNickname userNickname, @RequestPart(value = "image", required = false) MultipartFile file ) throws IOException { - return userService.settingProfile(user.getUserId(), file, nickname); + return userService.settingProfile(user.getUserId(), file, userNickname.getNickname()); } @PostMapping("/init/{userId}") diff --git a/src/main/java/com/modernfarmer/farmusspring/domain/user/dto/request/UserNickname.java b/src/main/java/com/modernfarmer/farmusspring/domain/user/dto/request/UserNickname.java new file mode 100644 index 00000000..5a31283d --- /dev/null +++ b/src/main/java/com/modernfarmer/farmusspring/domain/user/dto/request/UserNickname.java @@ -0,0 +1,16 @@ +package com.modernfarmer.farmusspring.domain.user.dto.request; + + +import jakarta.validation.constraints.NotNull; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; + +@Getter +@AllArgsConstructor +@NoArgsConstructor +public class UserNickname { + + @NotNull(message = "null 값을 가지면 안됩니다.") + private String nickname; +} From dc54971be7e5ce6da7faf6634dcd815d45751214 Mon Sep 17 00:00:00 2001 From: seungryeol Date: Tue, 20 Aug 2024 01:00:11 +0900 Subject: [PATCH 3/3] =?UTF-8?q?[fix]=20=EC=9B=90=EB=A7=90=20=EB=9D=84?= =?UTF-8?q?=EC=96=B4=EC=93=B0=EA=B8=B0=20=EC=8B=9C=20\n=EC=9C=BC=EB=A1=9C?= =?UTF-8?q?=20=EB=B0=94=EB=80=9C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/util/EncouragementMessages.java | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/modernfarmer/farmusspring/domain/user/util/EncouragementMessages.java b/src/main/java/com/modernfarmer/farmusspring/domain/user/util/EncouragementMessages.java index 39860a09..4a06cd5e 100644 --- a/src/main/java/com/modernfarmer/farmusspring/domain/user/util/EncouragementMessages.java +++ b/src/main/java/com/modernfarmer/farmusspring/domain/user/util/EncouragementMessages.java @@ -3,25 +3,25 @@ public enum EncouragementMessages { 알뜰살뜰(new String[]{ - "채소를 직접 길러_식비를 줄여보세요!", - "직접 기른 채소로_알뜰하고 현명한 식사를 해봐요!", - "오늘도 채솟값_알뜰하게 아끼는 중!", - "홈파밍으로 지출은 줄이고_성취감은 더해봐요", - "직접 기른 채소로_매일 알뜰하게, 매일 특별하게!" + "채소를 직접 길러\n식비를 줄여보세요!", + "직접 기른 채소로\n알뜰하고 현명한 식사를 해봐요!", + "오늘도 채솟값\n알뜰하게 아끼는 중!", + "홈파밍으로 지출은 줄이고\n성취감은 더해봐요", + "직접 기른 채소로\n매일 알뜰하게, 매일 특별하게!" }), 건강과웰빙(new String[]{ - "파머님, 직접 기른 채소로_건강한 삶을 챙겨봐요!", - "파머님의 사랑으로_오늘도 쑥쑥 자라는 중", - "직접 기른 채소를_먹을 수 있는 그날까지!", - "신선함으로 가득 채워지는 식탁, _ 늘 함께할게요!", - "눈으로 보는 재미, 입으로 맛보는_홈파밍의 즐거움!" + "파머님, 직접 기른 채소로\n건강한 삶을 챙겨봐요!", + "파머님의 사랑으로\n오늘도 쑥쑥 자라는 중", + "직접 기른 채소를\n먹을 수 있는 그날까지!", + "신선함으로 가득 채워지는 식탁, \n 늘 함께할게요!", + "눈으로 보는 재미, 입으로 맛보는\n홈파밍의 즐거움!" }), 심리적안정(new String[]{ - "바쁜 일상에서 잠깐 벗어나_텃밭을 가꿔봐요", - "홈파밍을 하며_마음의 안정을 느껴봐요!", - "스트레스 받는 하루, _ 홈파밍으로 힐링하세요", - "나만의 채소를 키우며_소소한 성취감을 느껴보세요", - "성취감은 꾸준함에서! _ 오늘도 함께 성장해요" + "바쁜 일상에서 잠깐 벗어나\n텃밭을 가꿔봐요", + "홈파밍을 하며\n마음의 안정을 느껴봐요!", + "스트레스 받는 하루, \n 홈파밍으로 힐링하세요", + "나만의 채소를 키우며\n소소한 성취감을 느껴보세요", + "성취감은 꾸준함에서! \n 오늘도 함께 성장해요" }); private final String[] messages;