Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #58

Merged
merged 2 commits into from
Oct 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
package kusitms.server.domain.tumbler.history.controller;


import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import kusitms.server.domain.common.dto.SuccessResponse;
import kusitms.server.domain.common.dto.code.SuccessCode;
import kusitms.server.domain.tumbler.current.dto.response.MainResponseDto;
import kusitms.server.domain.tumbler.history.dto.response.HistoryBoardGraphResponseDto;
import kusitms.server.domain.tumbler.history.dto.response.HistoryMonthDetailResponseDto;
import kusitms.server.domain.tumbler.history.dto.response.HistoryQuarterDetailResponseDto;
Expand All @@ -24,24 +29,36 @@ public class TumblerHistoryController {
private final TumblerHistoryService tumblerHistoryService;

// ex. 202310 이정도로 달까지만 주세요
@Operation(summary = "부서 텀블러 랭킹 내역 월별 상세 조회 API", description = "부서 텀블러 랭킹 내역 월별 상세 조회하기")
@ApiResponse(responseCode = "200", description = "OK",
content = @Content(schema = @Schema(implementation = HistoryMonthDetailResponseDto.class)))
@GetMapping("/month/{userId}")
public ResponseEntity<SuccessResponse<List<HistoryMonthDetailResponseDto>>> findDetailByMonth(@RequestParam String period, @PathVariable Long userId) {
List<HistoryMonthDetailResponseDto> request = tumblerHistoryService.findDetailByMonth(period, userId);
return SuccessResponse.of(SuccessCode.OK, request);
}

@Operation(summary = "부서 텀블러 랭킹 내역 분기별 상세 조회 API", description = "부서 텀블러 랭킹 내역 분기별 상세 조회하기")
@ApiResponse(responseCode = "200", description = "OK",
content = @Content(schema = @Schema(implementation = HistoryQuarterDetailResponseDto.class)))
@GetMapping("/quarter/{userId}")
public ResponseEntity<SuccessResponse<List<HistoryQuarterDetailResponseDto>>> findDetailByQuarter(@RequestParam String startPeriod, @RequestParam String endPeriod, @PathVariable Long userId) {
List<HistoryQuarterDetailResponseDto> request = tumblerHistoryService.findDetailByQuarter(startPeriod, endPeriod, userId);
return SuccessResponse.of(SuccessCode.OK, request);
}

@Operation(summary = "부서 대시보드 랭킹 조회 API", description = "부서 대시보드 랭킹 조회하기")
@ApiResponse(responseCode = "200", description = "OK",
content = @Content(schema = @Schema(implementation = HistoryRankResponseDto.class)))
@GetMapping("/rank/{userId}")
public ResponseEntity<SuccessResponse<List<HistoryRankResponseDto>>> findHistoryRank(@RequestParam String period, @PathVariable Long userId) {
List<HistoryRankResponseDto> request = tumblerHistoryService.findHistoryRank(period, userId);
return SuccessResponse.of(SuccessCode.OK, request);
}

@Operation(summary = "부서 대시보드 월별 그래프 조회 API", description = "부서 대시보드 월별 그래프 조회하기")
@ApiResponse(responseCode = "200", description = "OK",
content = @Content(schema = @Schema(implementation = HistoryBoardGraphResponseDto.class)))
@GetMapping("/graph/{userId}")
public ResponseEntity<SuccessResponse<List<HistoryBoardGraphResponseDto>>> findHistoryGraph(@RequestParam String period, @PathVariable Long userId) {
List<HistoryBoardGraphResponseDto> request = tumblerHistoryService.findHistoryGraph(period, userId);
Expand Down