From eb15c066ebc4b0f7385d93a2201f70709b7819ee Mon Sep 17 00:00:00 2001 From: mikekks Date: Thu, 5 Sep 2024 00:13:07 +0900 Subject: [PATCH 1/3] =?UTF-8?q?del(meeting):=20=EB=AA=A8=EC=9E=84=20?= =?UTF-8?q?=EC=A7=80=EC=9B=90=EC=9E=90=20=EB=AA=A9=EB=A1=9D=20csv=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EB=8B=A4=EC=9A=B4=EB=A1=9C=EB=93=9C=20tem?= =?UTF-8?q?p=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../crew/main/meeting/v2/MeetingV2Api.java | 10 ---------- .../main/meeting/v2/MeetingV2Controller.java | 17 ----------------- 2 files changed, 27 deletions(-) diff --git a/main/src/main/java/org/sopt/makers/crew/main/meeting/v2/MeetingV2Api.java b/main/src/main/java/org/sopt/makers/crew/main/meeting/v2/MeetingV2Api.java index e507c64a..480fdd8b 100644 --- a/main/src/main/java/org/sopt/makers/crew/main/meeting/v2/MeetingV2Api.java +++ b/main/src/main/java/org/sopt/makers/crew/main/meeting/v2/MeetingV2Api.java @@ -134,16 +134,6 @@ ResponseEntity getAppliesCsvFileUrl( @ModelAttribute @Valid @Parameter(hidden = true) MeetingGetAppliesCsvQueryDto queryCommand, Principal principal); - @Operation(summary = "[TEMP] 모임 지원자 목록 csv 파일 다운로드", description = "모임 지원자 목록 csv 파일 다운로드") - @Parameters({ - @Parameter(name = "status", description = "0: 대기, 1: 승인된 신청자, 2: 거절된 신청자", example = "0,1", required = true, schema = @Schema(type = "string")), - @Parameter(name = "type", description = "0: 지원, 1: 초대", example = "0,1", required = true, schema = @Schema(type = "string")), - @Parameter(name = "order", description = "정렬순", example = "desc", schema = @Schema(type = "string", format = "string"))}) - ResponseEntity> getAppliesCsvFileUrlTemp( - @PathVariable Integer meetingId, - @ModelAttribute @Valid @Parameter(hidden = true) MeetingGetAppliesCsvQueryDto queryCommand, - Principal principal); - @Operation(summary = "모임 상세 조회", description = "모임 상세 조회") @ApiResponses(value = {@ApiResponse(responseCode = "200", description = "모임 상세 조회 성공"), @ApiResponse(responseCode = "400", description = "모임이 없습니다.", content = @Content),}) diff --git a/main/src/main/java/org/sopt/makers/crew/main/meeting/v2/MeetingV2Controller.java b/main/src/main/java/org/sopt/makers/crew/main/meeting/v2/MeetingV2Controller.java index f4817628..617d4443 100644 --- a/main/src/main/java/org/sopt/makers/crew/main/meeting/v2/MeetingV2Controller.java +++ b/main/src/main/java/org/sopt/makers/crew/main/meeting/v2/MeetingV2Controller.java @@ -188,23 +188,6 @@ public ResponseEntity getAppliesCsvFileUrl( return ResponseEntity.ok(responseDto); } - @Override - @GetMapping("/{meetingId}/list/csv/temp") - public ResponseEntity> getAppliesCsvFileUrlTemp( - @PathVariable Integer meetingId, - @ModelAttribute @Valid MeetingGetAppliesCsvQueryDto queryCommand, - Principal principal) { - Integer userId = UserUtil.getUserId(principal); - - // TODO: FE 에서 request 값 변경하도록 요청 필요 - List statuses = List.of(0, 1, 2); - - AppliesCsvFileUrlResponseDto responseDto = meetingV2Service.getAppliesCsvFileUrl(meetingId, statuses, - queryCommand.getOrder(), userId); - - return ResponseEntity.ok(TempResponseDto.of(responseDto)); - } - @Override @GetMapping("/{meetingId}") public ResponseEntity getMeetingById(@PathVariable Integer meetingId, From e7602f5c07c69dff4b7f182356c98941e7279262 Mon Sep 17 00:00:00 2001 From: mikekks Date: Thu, 5 Sep 2024 00:13:43 +0900 Subject: [PATCH 2/3] =?UTF-8?q?del(meeting):=20=EB=AA=A8=EC=9E=84=20?= =?UTF-8?q?=EA=B2=8C=EC=8B=9C=EA=B8=80=20=EB=8C=93=EA=B8=80=20=EB=A6=AC?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EC=A1=B0=ED=9A=8C=20temp=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../makers/crew/main/comment/v2/CommentV2Api.java | 15 --------------- .../crew/main/comment/v2/CommentV2Controller.java | 13 ------------- 2 files changed, 28 deletions(-) diff --git a/main/src/main/java/org/sopt/makers/crew/main/comment/v2/CommentV2Api.java b/main/src/main/java/org/sopt/makers/crew/main/comment/v2/CommentV2Api.java index 2ce70189..485fbe2f 100644 --- a/main/src/main/java/org/sopt/makers/crew/main/comment/v2/CommentV2Api.java +++ b/main/src/main/java/org/sopt/makers/crew/main/comment/v2/CommentV2Api.java @@ -112,21 +112,6 @@ ResponseEntity getComments( @Valid @ModelAttribute @Parameter(hidden = true) CommentV2GetCommentsQueryDto request, Principal principal); - @Operation(summary = "[TEMP] 모임 게시글 댓글 리스트 조회") - @ResponseStatus(HttpStatus.OK) - @ApiResponses(value = { - @ApiResponse( - responseCode = "200", - description = "성공"), - }) - @Parameters({ - @Parameter(name = "page", description = "페이지, default = 1", example = "1", schema = @Schema(type = "integer", format = "int32")), - @Parameter(name = "take", description = "가져올 데이터 개수, default = 12", example = "50", schema = @Schema(type = "integer", format = "int32")), - @Parameter(name = "postId", description = "게시글 id", example = "3", schema = @Schema(type = "integer", format = "int32"))}) - ResponseEntity> getCommentsTemp( - @Valid @ModelAttribute @Parameter(hidden = true) CommentV2GetCommentsQueryDto request, - Principal principal); - @Operation(summary = "모임 게시글 댓글 좋아요 토글") @ResponseStatus(HttpStatus.CREATED) @ApiResponses(value = { diff --git a/main/src/main/java/org/sopt/makers/crew/main/comment/v2/CommentV2Controller.java b/main/src/main/java/org/sopt/makers/crew/main/comment/v2/CommentV2Controller.java index 52c9c097..fd0220ce 100644 --- a/main/src/main/java/org/sopt/makers/crew/main/comment/v2/CommentV2Controller.java +++ b/main/src/main/java/org/sopt/makers/crew/main/comment/v2/CommentV2Controller.java @@ -101,19 +101,6 @@ public ResponseEntity getComments( return ResponseEntity.status(HttpStatus.OK).body(commentDtos); } - @Override - @GetMapping("/temp") - public ResponseEntity> getCommentsTemp( - @Valid @ModelAttribute @Parameter(hidden = true) CommentV2GetCommentsQueryDto request, - Principal principal) { - - Integer userId = UserUtil.getUserId(principal); - CommentV2GetCommentsResponseDto commentDtos = commentV2Service.getComments(request.getPostId(), - request.getPage(), request.getTake(), userId); - - return ResponseEntity.status(HttpStatus.OK).body(TempResponseDto.of(commentDtos)); - } - @Override @PostMapping("/{commentId}/like") public ResponseEntity switchCommentLike( From dfd04c2e92522510406f02c383d245009842157a Mon Sep 17 00:00:00 2001 From: mikekks Date: Thu, 5 Sep 2024 00:17:23 +0900 Subject: [PATCH 3/3] =?UTF-8?q?chore(meeting):=20=EC=9C=A0=EC=A0=80=20?= =?UTF-8?q?=EA=B4=80=EB=A0=A8=20API=20temp=20=EB=B2=84=EC=A0=84=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 --- .../makers/crew/main/user/v2/UserV2Api.java | 93 ++++++++++++------- .../crew/main/user/v2/UserV2Controller.java | 24 +++++ 2 files changed, 82 insertions(+), 35 deletions(-) diff --git a/main/src/main/java/org/sopt/makers/crew/main/user/v2/UserV2Api.java b/main/src/main/java/org/sopt/makers/crew/main/user/v2/UserV2Api.java index b7a96cb8..bff76d4a 100644 --- a/main/src/main/java/org/sopt/makers/crew/main/user/v2/UserV2Api.java +++ b/main/src/main/java/org/sopt/makers/crew/main/user/v2/UserV2Api.java @@ -5,9 +5,11 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; + import java.security.Principal; import java.util.List; +import org.sopt.makers.crew.main.common.dto.TempResponseDto; import org.sopt.makers.crew.main.user.v2.dto.response.UserV2GetAllMeetingByUserMeetingDto; import org.sopt.makers.crew.main.user.v2.dto.response.UserV2GetAllMentionUserDto; import org.sopt.makers.crew.main.user.v2.dto.response.UserV2GetAppliedMeetingByUserResponseDto; @@ -20,43 +22,64 @@ @Tag(name = "사용자") public interface UserV2Api { - @Operation(summary = "내가 속한 모임 조회") - @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "성공"), - @ApiResponse(responseCode = "204", description = "내가 속한 모임 리스트가 없는 경우", content = @Content), - }) - ResponseEntity> getAllMeetingByUser(Principal principal); - - @Operation(summary = "멘션 사용자 조회") - @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "성공")}) - ResponseEntity> getAllMentionUser(Principal principal); - - @Operation(summary = "유저 본인 프로필 조회") - @ResponseStatus(HttpStatus.OK) - @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "성공"), - @ApiResponse(responseCode = "400", description = "해당 유저가 없는 경우", content = @Content), - }) - ResponseEntity getUserOwnProfile(Principal principal); - - @Operation(summary = "내가 신청한 모임 조회") - @ResponseStatus(HttpStatus.OK) - @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "성공") - }) - ResponseEntity getAppliedMeetingByUser( - Principal principal); - - @Operation(summary = "내가 만든 모임 조회") - @ResponseStatus(HttpStatus.OK) - @ApiResponses(value = { - @ApiResponse(responseCode = "200", description = "성공") - }) - ResponseEntity getCreatedMeetingByUser( - Principal principal); + @Operation(summary = "내가 속한 모임 조회") + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "성공"), + @ApiResponse(responseCode = "204", description = "내가 속한 모임 리스트가 없는 경우", content = @Content), + }) + ResponseEntity> getAllMeetingByUser(Principal principal); + + @Operation(summary = "멘션 사용자 조회") + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "성공")}) + ResponseEntity> getAllMentionUser(Principal principal); + + @Operation(summary = "유저 본인 프로필 조회") + @ResponseStatus(HttpStatus.OK) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "성공"), + @ApiResponse(responseCode = "400", description = "해당 유저가 없는 경우", content = @Content), + }) + ResponseEntity getUserOwnProfile(Principal principal); + + @Operation(summary = "[TEMP] 유저 본인 프로필 조회") + @ResponseStatus(HttpStatus.OK) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "성공"), + @ApiResponse(responseCode = "400", description = "해당 유저가 없는 경우", content = @Content), + }) + ResponseEntity> getUserOwnProfileTemp(Principal principal); + + @Operation(summary = "내가 신청한 모임 조회") + @ResponseStatus(HttpStatus.OK) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "성공") + }) + ResponseEntity getAppliedMeetingByUser( + Principal principal); + @Operation(summary = "[TEMP] 내가 신청한 모임 조회") + @ResponseStatus(HttpStatus.OK) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "성공") + }) + ResponseEntity> getAppliedMeetingByUserTemp( + Principal principal); + @Operation(summary = "내가 만든 모임 조회") + @ResponseStatus(HttpStatus.OK) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "성공") + }) + ResponseEntity getCreatedMeetingByUser( + Principal principal); + @Operation(summary = "[TEMP] 내가 만든 모임 조회") + @ResponseStatus(HttpStatus.OK) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "성공") + }) + ResponseEntity> getCreatedMeetingByUserTemp( + Principal principal); } diff --git a/main/src/main/java/org/sopt/makers/crew/main/user/v2/UserV2Controller.java b/main/src/main/java/org/sopt/makers/crew/main/user/v2/UserV2Controller.java index 43bfe6ed..6363619a 100644 --- a/main/src/main/java/org/sopt/makers/crew/main/user/v2/UserV2Controller.java +++ b/main/src/main/java/org/sopt/makers/crew/main/user/v2/UserV2Controller.java @@ -5,6 +5,7 @@ import lombok.RequiredArgsConstructor; +import org.sopt.makers.crew.main.common.dto.TempResponseDto; import org.sopt.makers.crew.main.common.util.UserUtil; import org.sopt.makers.crew.main.user.v2.dto.response.UserV2GetAllMeetingByUserMeetingDto; import org.sopt.makers.crew.main.user.v2.dto.response.UserV2GetAllMentionUserDto; @@ -51,6 +52,14 @@ public ResponseEntity getUserOwnProfile(Prin return ResponseEntity.ok().body(userV2Service.getUserOwnProfile(userId)); } + @Override + @GetMapping("/profile/me/temp") + public ResponseEntity> getUserOwnProfileTemp( + Principal principal) { + Integer userId = UserUtil.getUserId(principal); + return ResponseEntity.ok().body(TempResponseDto.of(userV2Service.getUserOwnProfile(userId))); + } + @Override @GetMapping("/apply") public ResponseEntity getAppliedMeetingByUser(Principal principal) { @@ -59,6 +68,14 @@ public ResponseEntity getAppliedMeetin return ResponseEntity.ok().body(userV2Service.getAppliedMeetingByUser(userId)); } + @Override + @GetMapping("/apply/temp") + public ResponseEntity> getAppliedMeetingByUserTemp( + Principal principal) { + Integer userId = UserUtil.getUserId(principal); + return ResponseEntity.ok().body(TempResponseDto.of(userV2Service.getAppliedMeetingByUser(userId))); + } + @Override @GetMapping("/meeting") public ResponseEntity getCreatedMeetingByUser(Principal principal) { @@ -67,5 +84,12 @@ public ResponseEntity getCreatedMeetin return ResponseEntity.ok().body(userV2Service.getCreatedMeetingByUser(userId)); } + @Override + @GetMapping("/meeting/temp") + public ResponseEntity> getCreatedMeetingByUserTemp( + Principal principal) { + Integer userId = UserUtil.getUserId(principal); + return ResponseEntity.ok().body(TempResponseDto.of(userV2Service.getCreatedMeetingByUser(userId))); + } }