From 103f4eb47e7863cd9f616bfd2b5a4850f5fc6a9d Mon Sep 17 00:00:00 2001 From: seungryeol Date: Mon, 20 Nov 2023 15:40:07 +0900 Subject: [PATCH 01/10] =?UTF-8?q?[feat]=20farm,=20community=20=EC=98=A4?= =?UTF-8?q?=ED=94=88=20=ED=8E=98=EC=9D=B8=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../community/CommunityServiceFeignClient.java | 18 ++++++++++++++++++ .../farm/FarmServiceFeignClient.java | 14 ++++++++++++++ .../farmususer/user/service/UserService.java | 11 +++++++++++ 3 files changed, 43 insertions(+) create mode 100644 src/main/java/modernfarmer/server/farmususer/community/CommunityServiceFeignClient.java create mode 100644 src/main/java/modernfarmer/server/farmususer/farm/FarmServiceFeignClient.java diff --git a/src/main/java/modernfarmer/server/farmususer/community/CommunityServiceFeignClient.java b/src/main/java/modernfarmer/server/farmususer/community/CommunityServiceFeignClient.java new file mode 100644 index 0000000..4ecc013 --- /dev/null +++ b/src/main/java/modernfarmer/server/farmususer/community/CommunityServiceFeignClient.java @@ -0,0 +1,18 @@ +package modernfarmer.server.farmususer.community; + + +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestParam; + +@FeignClient(name = "community-service") +public interface CommunityServiceFeignClient { + + @DeleteMapping("/api/community/posting/all-posting") + Void deleteAllPosting(Long userId); + + + + +} diff --git a/src/main/java/modernfarmer/server/farmususer/farm/FarmServiceFeignClient.java b/src/main/java/modernfarmer/server/farmususer/farm/FarmServiceFeignClient.java new file mode 100644 index 0000000..a39f7ab --- /dev/null +++ b/src/main/java/modernfarmer/server/farmususer/farm/FarmServiceFeignClient.java @@ -0,0 +1,14 @@ +package modernfarmer.server.farmususer.farm; + + +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; + +@FeignClient(name = "farm-service") +public interface FarmServiceFeignClient { + + @DeleteMapping("/api/veggie/{userId}") + Void deleteAllFarm(@PathVariable("userId") Long userId); + +} diff --git a/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java b/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java index 00863e1..85d5da8 100644 --- a/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java +++ b/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java @@ -2,6 +2,8 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import modernfarmer.server.farmususer.community.CommunityServiceFeignClient; +import modernfarmer.server.farmususer.farm.FarmServiceFeignClient; import modernfarmer.server.farmususer.global.config.s3.S3Uploader; import modernfarmer.server.farmususer.global.exception.fail.ErrorMessage; import modernfarmer.server.farmususer.global.exception.success.SuccessMessage; @@ -32,6 +34,8 @@ public class UserService { private final UserRepository userRepository; private final S3Uploader s3Uploader; private final TimeCalculator timeCalculator; + private final CommunityServiceFeignClient communityServiceFeignClient; + private final FarmServiceFeignClient farmServiceFeignClient; // public BaseResponseDto emitProfileImage(Long userId, MultipartFile multipartFile) throws IOException { @@ -114,6 +118,13 @@ public BaseResponseDto deleteUser(Long userId){ userRepository.deleteUser(userId); + farmServiceFeignClient.deleteAllFarm(userId); + + communityServiceFeignClient.deleteAllPosting(userId); + + + + log.info("유저 계정 삭제 완료"); return BaseResponseDto.of(SuccessMessage.SUCCESS,null); From 6129d9a0a492da1c0b4e866e43fa4a39ba8cc568 Mon Sep 17 00:00:00 2001 From: seungryeol Date: Mon, 20 Nov 2023 15:44:42 +0900 Subject: [PATCH 02/10] =?UTF-8?q?[feat]=20farm,=20community=20=EC=98=A4?= =?UTF-8?q?=ED=94=88=20=ED=8E=98=EC=9D=B8=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index b64cef6..9b13c4d 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -2,7 +2,7 @@ name: ModernFarmer CI/CD on: push: - branches: ["feature_29/코드-정리"] + branches: ["feature_32/계정-삭제-api"] pull_request: branches: ["dev"] From 6ee84f3caf947cd007844103da36875fda780bfb Mon Sep 17 00:00:00 2001 From: seungryeol Date: Mon, 20 Nov 2023 16:09:18 +0900 Subject: [PATCH 03/10] =?UTF-8?q?[fix]=20=EC=9C=A0=EB=A0=88=EC=B9=B4=20?= =?UTF-8?q?=ED=95=B4=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../farmususer/community/CommunityServiceFeignClient.java | 2 +- .../server/farmususer/farm/FarmServiceFeignClient.java | 2 +- .../server/farmususer/user/service/UserService.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/modernfarmer/server/farmususer/community/CommunityServiceFeignClient.java b/src/main/java/modernfarmer/server/farmususer/community/CommunityServiceFeignClient.java index 4ecc013..9b2cc3a 100644 --- a/src/main/java/modernfarmer/server/farmususer/community/CommunityServiceFeignClient.java +++ b/src/main/java/modernfarmer/server/farmususer/community/CommunityServiceFeignClient.java @@ -6,7 +6,7 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestParam; -@FeignClient(name = "community-service") +@FeignClient(name = "community-service", url = "http://3.38.2.59:8082") public interface CommunityServiceFeignClient { @DeleteMapping("/api/community/posting/all-posting") diff --git a/src/main/java/modernfarmer/server/farmususer/farm/FarmServiceFeignClient.java b/src/main/java/modernfarmer/server/farmususer/farm/FarmServiceFeignClient.java index a39f7ab..3dedfb3 100644 --- a/src/main/java/modernfarmer/server/farmususer/farm/FarmServiceFeignClient.java +++ b/src/main/java/modernfarmer/server/farmususer/farm/FarmServiceFeignClient.java @@ -5,7 +5,7 @@ import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; -@FeignClient(name = "farm-service") +@FeignClient(name = "farm-service", url = "http://3.36.221.140:8081") public interface FarmServiceFeignClient { @DeleteMapping("/api/veggie/{userId}") diff --git a/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java b/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java index 85d5da8..9469e87 100644 --- a/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java +++ b/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java @@ -117,10 +117,10 @@ public BaseResponseDto signUpComlete(Long userId){ public BaseResponseDto deleteUser(Long userId){ userRepository.deleteUser(userId); - + communityServiceFeignClient.deleteAllPosting(userId); farmServiceFeignClient.deleteAllFarm(userId); - communityServiceFeignClient.deleteAllPosting(userId); + From 3060bed82223f606d6720b724344f2a153448f02 Mon Sep 17 00:00:00 2001 From: seungryeol Date: Mon, 20 Nov 2023 16:58:37 +0900 Subject: [PATCH 04/10] =?UTF-8?q?[fix]=20=EC=9C=A0=EB=A0=88=EC=B9=B4=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../farmususer/community/CommunityServiceFeignClient.java | 8 +++++--- .../server/farmususer/farm/FarmServiceFeignClient.java | 4 ++-- .../server/farmususer/user/service/UserService.java | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/modernfarmer/server/farmususer/community/CommunityServiceFeignClient.java b/src/main/java/modernfarmer/server/farmususer/community/CommunityServiceFeignClient.java index 9b2cc3a..5973a2d 100644 --- a/src/main/java/modernfarmer/server/farmususer/community/CommunityServiceFeignClient.java +++ b/src/main/java/modernfarmer/server/farmususer/community/CommunityServiceFeignClient.java @@ -1,16 +1,18 @@ package modernfarmer.server.farmususer.community; +import modernfarmer.server.farmususer.user.dto.response.BaseResponseDto; +import modernfarmer.server.farmususer.user.entity.BaseEntity; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestParam; -@FeignClient(name = "community-service", url = "http://3.38.2.59:8082") +@FeignClient(name = "community-service") public interface CommunityServiceFeignClient { - @DeleteMapping("/api/community/posting/all-posting") - Void deleteAllPosting(Long userId); + @DeleteMapping("/api/community/posting/all-posting/{userId}") + void deleteAllPosting(@PathVariable("userId") Long userId); diff --git a/src/main/java/modernfarmer/server/farmususer/farm/FarmServiceFeignClient.java b/src/main/java/modernfarmer/server/farmususer/farm/FarmServiceFeignClient.java index 3dedfb3..7954bae 100644 --- a/src/main/java/modernfarmer/server/farmususer/farm/FarmServiceFeignClient.java +++ b/src/main/java/modernfarmer/server/farmususer/farm/FarmServiceFeignClient.java @@ -5,10 +5,10 @@ import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; -@FeignClient(name = "farm-service", url = "http://3.36.221.140:8081") +@FeignClient(name = "farm-service") public interface FarmServiceFeignClient { @DeleteMapping("/api/veggie/{userId}") - Void deleteAllFarm(@PathVariable("userId") Long userId); + void deleteAllVeggies(@PathVariable("userId") Long userId); } diff --git a/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java b/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java index 9469e87..d6eea49 100644 --- a/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java +++ b/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java @@ -118,7 +118,7 @@ public BaseResponseDto deleteUser(Long userId){ userRepository.deleteUser(userId); communityServiceFeignClient.deleteAllPosting(userId); - farmServiceFeignClient.deleteAllFarm(userId); + farmServiceFeignClient.deleteAllVeggies(userId); From 608f44f3e5c565293eb5b3dad85c787f6e5712cb Mon Sep 17 00:00:00 2001 From: seungryeol Date: Mon, 20 Nov 2023 18:28:35 +0900 Subject: [PATCH 05/10] =?UTF-8?q?[fix]=20=ED=8C=9C=20=EC=82=AD=EC=A0=9C=20?= =?UTF-8?q?=EC=A3=BC=EC=84=9D=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/farmususer/user/service/UserService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java b/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java index d6eea49..a87fedf 100644 --- a/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java +++ b/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java @@ -118,7 +118,7 @@ public BaseResponseDto deleteUser(Long userId){ userRepository.deleteUser(userId); communityServiceFeignClient.deleteAllPosting(userId); - farmServiceFeignClient.deleteAllVeggies(userId); + // farmServiceFeignClient.deleteAllVeggies(userId); From f5c01d2ca9297e4b8742d3ad2f828f0de3a6e537 Mon Sep 17 00:00:00 2001 From: seungryeol Date: Mon, 20 Nov 2023 19:22:48 +0900 Subject: [PATCH 06/10] =?UTF-8?q?[fix]=20entity=20cascade=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 --- .../server/farmususer/user/entity/UserFirebaseToken.java | 3 +-- .../server/farmususer/user/entity/UserMotivation.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/modernfarmer/server/farmususer/user/entity/UserFirebaseToken.java b/src/main/java/modernfarmer/server/farmususer/user/entity/UserFirebaseToken.java index d9ad3cb..6f6968f 100644 --- a/src/main/java/modernfarmer/server/farmususer/user/entity/UserFirebaseToken.java +++ b/src/main/java/modernfarmer/server/farmususer/user/entity/UserFirebaseToken.java @@ -28,8 +28,7 @@ public class UserFirebaseToken extends BaseEntity{ private String token; @NotNull - @ManyToOne(fetch = FetchType.LAZY, optional = false) - @OnDelete(action = OnDeleteAction.CASCADE) + @ManyToOne(fetch = FetchType.LAZY, optional = false, cascade = CascadeType.REMOVE) @JoinColumn(name = "user_id", nullable = false) private User user; diff --git a/src/main/java/modernfarmer/server/farmususer/user/entity/UserMotivation.java b/src/main/java/modernfarmer/server/farmususer/user/entity/UserMotivation.java index 9c5d852..1a7e9c6 100644 --- a/src/main/java/modernfarmer/server/farmususer/user/entity/UserMotivation.java +++ b/src/main/java/modernfarmer/server/farmususer/user/entity/UserMotivation.java @@ -27,8 +27,7 @@ public class UserMotivation extends BaseEntity{ private User user; @NotNull - @ManyToOne(fetch = FetchType.LAZY, optional = false) - @OnDelete(action = OnDeleteAction.CASCADE) + @ManyToOne(fetch = FetchType.LAZY, optional = false, cascade = CascadeType.REMOVE) @JoinColumn(name = "motivation_id", nullable = false) private Motivation motivation; From 7641dd701f41c398e348b71878ed83715b6cbfd3 Mon Sep 17 00:00:00 2001 From: MinchoGreenT Date: Tue, 21 Nov 2023 02:48:33 +0900 Subject: [PATCH 07/10] =?UTF-8?q?[feat]=20=ED=8E=98=EC=9D=B8=EC=9A=A9=20?= =?UTF-8?q?=EC=9C=A0=EC=A0=80=20=EB=82=9C=EC=9D=B4=EB=8F=84=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20api=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/farmususer/user/controller/UserController.java | 6 +++++- .../server/farmususer/user/service/UserService.java | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/modernfarmer/server/farmususer/user/controller/UserController.java b/src/main/java/modernfarmer/server/farmususer/user/controller/UserController.java index 00ba905..f245b6f 100644 --- a/src/main/java/modernfarmer/server/farmususer/user/controller/UserController.java +++ b/src/main/java/modernfarmer/server/farmususer/user/controller/UserController.java @@ -2,6 +2,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import modernfarmer.server.farmususer.global.exception.success.SuccessMessage; import modernfarmer.server.farmususer.user.dto.request.ProduceNicknameRequest; import modernfarmer.server.farmususer.user.dto.response.*; @@ -43,7 +44,10 @@ public BaseResponseDto getUser(HttpServletRequest request){ return userService.getUser(Long.valueOf(userId)); } - + @GetMapping("/level") + public String getUserLevel(@RequestHeader("user") Long userId){ + return userService.getUserLevel(userId); + } @PostMapping(value = "/nickname") public BaseResponseDto emitNickname(HttpServletRequest request, @RequestBody ProduceNicknameRequest produceNicknameRequest){ diff --git a/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java b/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java index a87fedf..a601c40 100644 --- a/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java +++ b/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java @@ -203,7 +203,12 @@ public BaseResponseDto reissueToken(String refreshToken } + public String getUserLevel(Long userId) { + User user = userRepository.findById(userId).orElseThrow(() -> new IllegalArgumentException("해당 유저가 없습니다. id=" + userId)); + + return user.getLevel(); + } From 5e91ee821b8f2affd795e954df8e04d9e9708d03 Mon Sep 17 00:00:00 2001 From: MinchoGreenT Date: Tue, 21 Nov 2023 03:21:12 +0900 Subject: [PATCH 08/10] =?UTF-8?q?[feat]=20=ED=8E=98=EC=9D=B8=EC=9A=A9=20?= =?UTF-8?q?=EC=9C=A0=EC=A0=80=20=EB=82=9C=EC=9D=B4=EB=8F=84=20=EB=B0=8F=20?= =?UTF-8?q?=EB=B3=84=EB=AA=85=20=EC=A1=B0=ED=9A=8C=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../farmususer/user/controller/UserController.java | 5 +++++ .../GetUserLevelAndNicknameResponseDto.java | 14 ++++++++++++++ .../farmususer/user/service/UserService.java | 7 ++++++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 src/main/java/modernfarmer/server/farmususer/user/dto/response/GetUserLevelAndNicknameResponseDto.java diff --git a/src/main/java/modernfarmer/server/farmususer/user/controller/UserController.java b/src/main/java/modernfarmer/server/farmususer/user/controller/UserController.java index f245b6f..99a6a81 100644 --- a/src/main/java/modernfarmer/server/farmususer/user/controller/UserController.java +++ b/src/main/java/modernfarmer/server/farmususer/user/controller/UserController.java @@ -49,6 +49,11 @@ public String getUserLevel(@RequestHeader("user") Long userId){ return userService.getUserLevel(userId); } + @GetMapping("/info") + public GetUserLevelAndNicknameResponseDto getUserLevelAndNickname(@RequestHeader("user") Long userId){ + return userService.getUserLevelAndNickname(userId); + } + @PostMapping(value = "/nickname") public BaseResponseDto emitNickname(HttpServletRequest request, @RequestBody ProduceNicknameRequest produceNicknameRequest){ diff --git a/src/main/java/modernfarmer/server/farmususer/user/dto/response/GetUserLevelAndNicknameResponseDto.java b/src/main/java/modernfarmer/server/farmususer/user/dto/response/GetUserLevelAndNicknameResponseDto.java new file mode 100644 index 0000000..7c98608 --- /dev/null +++ b/src/main/java/modernfarmer/server/farmususer/user/dto/response/GetUserLevelAndNicknameResponseDto.java @@ -0,0 +1,14 @@ +package modernfarmer.server.farmususer.user.dto.response; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; + +@AllArgsConstructor(staticName = "of") +@NoArgsConstructor +@Getter +public class GetUserLevelAndNicknameResponseDto { + + private String level; + private String nickname; +} diff --git a/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java b/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java index a601c40..b75560e 100644 --- a/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java +++ b/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java @@ -206,10 +206,15 @@ public BaseResponseDto reissueToken(String refreshToken public String getUserLevel(Long userId) { User user = userRepository.findById(userId).orElseThrow(() -> new IllegalArgumentException("해당 유저가 없습니다. id=" + userId)); - return user.getLevel(); } + public GetUserLevelAndNicknameResponseDto getUserLevelAndNickname(Long userId) { + + User user = userRepository.findById(userId).orElseThrow(() -> new IllegalArgumentException("해당 유저가 없습니다. id=" + userId)); + return GetUserLevelAndNicknameResponseDto.of(user.getLevel(), user.getNickname()); + } + From 3ef369483fb19bbe7c7d57fe9a7cbb17517f952f Mon Sep 17 00:00:00 2001 From: MinchoGreenT Date: Tue, 21 Nov 2023 19:07:06 +0900 Subject: [PATCH 09/10] =?UTF-8?q?[fix]=20=EC=9C=A0=EC=A0=80=20=EC=95=A1?= =?UTF-8?q?=EC=84=B8=EC=8A=A4=20=ED=86=A0=ED=81=B0=20=EA=B8=B0=ED=95=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/farmususer/user/util/JwtTokenProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/modernfarmer/server/farmususer/user/util/JwtTokenProvider.java b/src/main/java/modernfarmer/server/farmususer/user/util/JwtTokenProvider.java index 3a82efc..b7f1c7e 100644 --- a/src/main/java/modernfarmer/server/farmususer/user/util/JwtTokenProvider.java +++ b/src/main/java/modernfarmer/server/farmususer/user/util/JwtTokenProvider.java @@ -28,7 +28,7 @@ public class JwtTokenProvider { private String secretKey; - private final long accessTokenTime = 30L * 1000 * 100; // 1달 토큰 유효 + private final long accessTokenTime = 365L * 24 * 60 * 60 * 1000; // 1달 토큰 유효 private final long refreshTokenTime = 30L * 1000 * 2 * 1000; // 1달 토큰 유효 From 9cfea3584b1b37a50687f4cbb6949890fa78cf4b Mon Sep 17 00:00:00 2001 From: MinchoGreenT Date: Tue, 21 Nov 2023 22:51:45 +0900 Subject: [PATCH 10/10] =?UTF-8?q?[fix]=20=EC=9C=A0=EC=A0=80=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=20=EC=8B=9C=20=EA=B2=8C=EC=8B=9C=EA=B8=80=EA=B3=BC=20?= =?UTF-8?q?=EC=B1=84=EC=86=8C=20=EC=A0=84=EB=B6=80=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../farmususer/community/CommunityServiceFeignClient.java | 2 +- .../server/farmususer/farm/FarmServiceFeignClient.java | 2 +- .../server/farmususer/user/service/UserService.java | 7 +------ 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/main/java/modernfarmer/server/farmususer/community/CommunityServiceFeignClient.java b/src/main/java/modernfarmer/server/farmususer/community/CommunityServiceFeignClient.java index 5973a2d..8046079 100644 --- a/src/main/java/modernfarmer/server/farmususer/community/CommunityServiceFeignClient.java +++ b/src/main/java/modernfarmer/server/farmususer/community/CommunityServiceFeignClient.java @@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestParam; -@FeignClient(name = "community-service") +@FeignClient(url = "http://3.38.2.59:8082", name = "community-service") public interface CommunityServiceFeignClient { @DeleteMapping("/api/community/posting/all-posting/{userId}") diff --git a/src/main/java/modernfarmer/server/farmususer/farm/FarmServiceFeignClient.java b/src/main/java/modernfarmer/server/farmususer/farm/FarmServiceFeignClient.java index 7954bae..667dcf9 100644 --- a/src/main/java/modernfarmer/server/farmususer/farm/FarmServiceFeignClient.java +++ b/src/main/java/modernfarmer/server/farmususer/farm/FarmServiceFeignClient.java @@ -5,7 +5,7 @@ import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; -@FeignClient(name = "farm-service") +@FeignClient(url = "http://3.36.221.140:8081", name = "farm-service") public interface FarmServiceFeignClient { @DeleteMapping("/api/veggie/{userId}") diff --git a/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java b/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java index b75560e..be251bf 100644 --- a/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java +++ b/src/main/java/modernfarmer/server/farmususer/user/service/UserService.java @@ -118,12 +118,7 @@ public BaseResponseDto deleteUser(Long userId){ userRepository.deleteUser(userId); communityServiceFeignClient.deleteAllPosting(userId); - // farmServiceFeignClient.deleteAllVeggies(userId); - - - - - + farmServiceFeignClient.deleteAllVeggies(userId); log.info("유저 계정 삭제 완료");