From 48615af72cdcf60dad9c95dd235b5e1a42473cc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=83=81=EB=AF=BC?= Date: Thu, 23 May 2024 12:16:27 +0900 Subject: [PATCH] Feat/81 (#83) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(#81): 의사/센터 앱에서 환자 무드 및 차트 조회 기능 추가 * refactor(#81): 메소드 파라미터 리팩토링 * refactor(#81): url endpoint 리팩토링 --- .../mood/controller/MoodChartController.java | 19 ++++++++++++++++++- .../core/security/config/SecuirityConfig.java | 1 + 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/remind/api/mood/controller/MoodChartController.java b/src/main/java/com/remind/api/mood/controller/MoodChartController.java index 78edb9e..386ae1c 100644 --- a/src/main/java/com/remind/api/mood/controller/MoodChartController.java +++ b/src/main/java/com/remind/api/mood/controller/MoodChartController.java @@ -79,8 +79,25 @@ public ResponseEntity>> getMoodC @AuthenticationPrincipal UserDetailsImpl userDetails) { return ResponseEntity.ok( new ApiSuccessResponse<>(moodChartService.getActivityChart(userDetails.getMemberId()))); + + } + + @Operation( + summary = "의사/센터의 특정 환자의 기분 별 활동 차트 안의 기분 percent 조회" + ) + @ApiResponse( + responseCode = "200", description = "기분 별 활동 차트 안의 기분 percent 조회 성공 응답입니다.", useReturnTypeSchema = true + ) + @GetMapping("/percents/{memberId}") + public ResponseEntity>> getMoodChartPercents( + @AuthenticationPrincipal UserDetailsImpl userDetails, + @PathVariable("memberId") Long memberId) { + return ResponseEntity.ok( + new ApiSuccessResponse<>(moodChartService.getActivityChart(memberId))); + } + @Operation( summary = "의사/센터의 특정 환자의 기분 별 활동 차트 안의 기분 percent 조회" ) @@ -116,7 +133,7 @@ public ResponseEntity>> getA @ApiResponse( responseCode = "200", description = "특정 기분에 대한 활동 퍼센트 조회 성공 응답입니다.", useReturnTypeSchema = true ) - @GetMapping("/percent/activity") + @GetMapping("/connection/percent/activity") public ResponseEntity>> getActivityPercentChart( @AuthenticationPrincipal UserDetailsImpl userDetails, @Parameter(description = "감정") @RequestParam("feelingType") FeelingType feelingType, diff --git a/src/main/java/com/remind/core/security/config/SecuirityConfig.java b/src/main/java/com/remind/core/security/config/SecuirityConfig.java index 7ff3180..71593c2 100644 --- a/src/main/java/com/remind/core/security/config/SecuirityConfig.java +++ b/src/main/java/com/remind/core/security/config/SecuirityConfig.java @@ -107,6 +107,7 @@ private RequestMatcher[] authorizeRequestMathcers() { antMatcher(GET, "/mood/chart/percents"), antMatcher(GET, "/mood/chart/percents/{memberId}"), antMatcher(GET, "/mood/chart/percent/activity"), + antMatcher(GET, "/mood/chart/connection/percent/activity"), antMatcher(POST, "/prescription/relation/request"), antMatcher(POST, "/prescription/relation/accept"), antMatcher(GET, "/prescription"),