zjk
2026-09-29 54dcf0a82e7490fa58b1c056d5c0b9cb739c2931
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.tcm.training.admin.statistics.controller;
 
import com.tcm.training.admin.common.ApiResponse;
import com.tcm.training.admin.statistics.service.HomeDashboardAppService;
import com.tcm.training.admin.statistics.vo.HomeDashboardVO;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
@Validated
@RestController
@RequestMapping({"/api/v1", "/api"})
public class HomeDashboardController {
 
    private final HomeDashboardAppService homeDashboardAppService;
 
    public HomeDashboardController(HomeDashboardAppService homeDashboardAppService) {
        this.homeDashboardAppService = homeDashboardAppService;
    }
 
    @GetMapping("/home-dashboard")
    public ApiResponse<HomeDashboardVO> dashboard() {
        return ApiResponse.ok(homeDashboardAppService.dashboard());
    }
}