|
5 | 5 | import clap.server.application.port.inbound.statistics.FindPeriodTaskRequestUsecase; |
6 | 6 | import clap.server.application.port.inbound.statistics.FindSubCategoryTaskRequestUsecase; |
7 | 7 | import clap.server.common.annotation.architecture.WebAdapter; |
| 8 | +import io.swagger.v3.oas.annotations.tags.Tag; |
8 | 9 | import lombok.RequiredArgsConstructor; |
9 | 10 | import org.springframework.http.ResponseEntity; |
10 | 11 | import org.springframework.web.bind.annotation.GetMapping; |
| 12 | +import org.springframework.web.bind.annotation.RequestMapping; |
11 | 13 | import org.springframework.web.bind.annotation.RequestParam; |
12 | 14 |
|
13 | 15 | import java.util.Map; |
14 | 16 |
|
| 17 | +@Tag(name = "작업 관련 통계") |
15 | 18 | @WebAdapter |
16 | 19 | @RequiredArgsConstructor |
| 20 | +@RequestMapping("/api/tasks/statistics") |
17 | 21 | public class FindStatisticsController { |
18 | 22 | private final FindPeriodTaskRequestUsecase findPeriodTaskRequestUsecase; |
19 | 23 | private final FindPeriodTaskProcessUsecase findPeriodTaskProcessUsecase; |
20 | 24 | private final FindCategoryTaskRequestUsecase findCategoryTaskRequestUsecase; |
21 | 25 | private final FindSubCategoryTaskRequestUsecase findSubCategoryTaskRequestUsecase; |
22 | 26 | // private final ManagerTaskProcessUsecase managerTaskProcessUsecase; |
23 | 27 |
|
24 | | - @GetMapping(value = "/task/statistics/task-requests-by-period") |
| 28 | + @GetMapping(value = "/task-requests-by-period") |
25 | 29 | public ResponseEntity<Map<String, Long>> aggregatePeriodTaskRequest(@RequestParam String period) { |
26 | 30 | return ResponseEntity.ok(findPeriodTaskRequestUsecase.aggregatePeriodTaskRequest(period)); |
27 | 31 | } |
28 | 32 |
|
29 | | - @GetMapping("/task/statistics/task-processed-by-period") |
| 33 | + @GetMapping("/task-processed-by-period") |
30 | 34 | public ResponseEntity<Map<String, Long>> aggregatePeriodTaskProcess(@RequestParam String period) { |
31 | 35 | return ResponseEntity.ok(findPeriodTaskProcessUsecase.aggregatePeriodTaskProcess(period)); |
32 | 36 | } |
33 | | - @GetMapping("/task/statistics/task-requests-by-category") |
| 37 | + @GetMapping("/task-requests-by-category") |
34 | 38 | public ResponseEntity<Map<String, Long>> aggregateCategoryTaskRequest(@RequestParam String period) { |
35 | 39 | return ResponseEntity.ok(findCategoryTaskRequestUsecase.aggregateCategoryTaskRequest(period)); |
36 | 40 | } |
37 | 41 |
|
38 | | - @GetMapping("/task/statistics/task-requests-by-subcategory") |
| 42 | + @GetMapping("/task-requests-by-subcategory") |
39 | 43 | public ResponseEntity<Map<String, Long>> aggregateSubCategoryTaskRequest(@RequestParam String period, @RequestParam String mainCategory) { |
40 | 44 | return ResponseEntity.ok(findSubCategoryTaskRequestUsecase.aggregateSubCategoryTaskRequest(period, mainCategory)); |
41 | 45 | } |
|
0 commit comments