260506_01_fst: First Commit
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
package com.kri.kfpa.dash.controller;
|
||||
|
||||
import com.kri.kfpa.dash.dto.CsiDataDto;
|
||||
import com.kri.kfpa.dash.dto.DivDetailDataDto;
|
||||
import com.kri.kfpa.dash.service.StatisticsService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/v1/statistics")
|
||||
@RequiredArgsConstructor
|
||||
@Tag(name = "Statistics", description = "통계치 조회 API")
|
||||
public class StatisticsController {
|
||||
|
||||
private final StatisticsService statisticsService;
|
||||
|
||||
@Operation(summary = "csi 데이터 조회")
|
||||
@GetMapping("/csi")
|
||||
public Map<String, List<CsiDataDto>> getCsiData() {
|
||||
return statisticsService.getCsiData();
|
||||
}
|
||||
|
||||
@Operation(summary = "지역 본부 상세 조회")
|
||||
@GetMapping("/div-detail/{div}")
|
||||
public Map<String, DivDetailDataDto> getDivDetailData(
|
||||
@PathVariable String div
|
||||
) {
|
||||
return statisticsService.getDivDetailData(div);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user