package com.talentcard.server.business.admin;
|
|
import com.talentcard.server.common.ApiResponse;
|
import com.talentcard.server.service.AdminWorkbenchStatisticsService;
|
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.Map;
|
|
@RestController
|
@RequestMapping("/api/admin/workbench")
|
@Tag(name = "后台工作台", description = "后台首页核心指标和异常告警")
|
public class AdminWorkbenchStatisticsController {
|
private final AdminWorkbenchStatisticsService service;
|
|
public AdminWorkbenchStatisticsController(AdminWorkbenchStatisticsService service) {
|
this.service = service;
|
}
|
|
@GetMapping({"/statistics", "/dashboard"})
|
@Operation(summary = "查询工作台统计", description = "返回累计补贴总额、本月核销单数、持卡人总数、预算使用率和异常告警")
|
public ApiResponse<Map<String, Object>> statistics() {
|
return ApiResponse.success(service.summary());
|
}
|
}
|