From 4e16a4ff23ed1a0c38f1aff052483d7595522481 Mon Sep 17 00:00:00 2001 From: yummygyudon Date: Sun, 26 Nov 2023 03:22:52 +0900 Subject: [PATCH] =?UTF-8?q?FEAT=20:=20=EA=B5=90=ED=99=94=ED=99=9C=EB=8F=99?= =?UTF-8?q?=20=EC=84=B8=EB=B6=80=20=EB=B7=B0=20=EC=A1=B0=ED=9A=8C=20API=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sopkerton/user/controller/UserController.java | 13 +++++++++++++ .../sopkerton/user/dto/response/DetailView.java | 10 ++++++++++ 2 files changed, 23 insertions(+) create mode 100644 src/main/java/org/sopt/sopkerton/user/dto/response/DetailView.java diff --git a/src/main/java/org/sopt/sopkerton/user/controller/UserController.java b/src/main/java/org/sopt/sopkerton/user/controller/UserController.java index 24f7029..799e846 100644 --- a/src/main/java/org/sopt/sopkerton/user/controller/UserController.java +++ b/src/main/java/org/sopt/sopkerton/user/controller/UserController.java @@ -3,6 +3,7 @@ import lombok.RequiredArgsConstructor; import org.sopt.sopkerton.common.response.ApiResponse; import org.sopt.sopkerton.user.domain.exception.UserSuccess; +import org.sopt.sopkerton.user.dto.response.DetailView; import org.sopt.sopkerton.user.dto.response.MainView; import org.sopt.sopkerton.user.service.UserService; import org.springframework.http.ResponseEntity; @@ -29,4 +30,16 @@ public ResponseEntity> orderMainView( ApiResponse.success(UserSuccess.USER_MAIN_VIEW_SUCCESS, mainViewInfo) ); } + + @GetMapping("/info/detail/{userId}") + public ResponseEntity> orderDetailView( + @PathVariable("userId") Long userId + ) { + DetailView detailInfo = userService.getDetailInfo(userId); + return ResponseEntity + .status(UserSuccess.USER_DETAIL_VIEW_SUCCESS.getHttpStatus()) + .body( + ApiResponse.success(UserSuccess.USER_DETAIL_VIEW_SUCCESS, detailInfo) + ); + } } diff --git a/src/main/java/org/sopt/sopkerton/user/dto/response/DetailView.java b/src/main/java/org/sopt/sopkerton/user/dto/response/DetailView.java new file mode 100644 index 0000000..35e9e2b --- /dev/null +++ b/src/main/java/org/sopt/sopkerton/user/dto/response/DetailView.java @@ -0,0 +1,10 @@ +package org.sopt.sopkerton.user.dto.response; + +import java.util.List; + +public record DetailView( + List volunteers, + List programs, + List certifications +) { +}